home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '91 / '91 Attendee Contributions / Jon Gary's Notes & Examples / Notes / externals < prev    next >
Unknown  |  1991-06-18  |  13.7 KB  |  [nX^d/nX^n]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default


id metadata
keyvalue
macFileType[nX^d]
macFileCreator[nX^n]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 04 00 36 4d 04 00 0c 14 |........|..6M....|
|00000010| 04 00 18 52 04 00 0c 2e | 04 00 02 5d 00 41 52 18 |...R....|...].AR.|
|00000020| 00 41 52 1c 00 41 52 20 | 00 3c 00 01 00 41 52 10 |.AR..AR |.<...AR.|
|00000030| 00 00 00 00 00 00 09 76 | 0a a8 80 33 ff ff 00 00 |.......v|...3....|
|00000040| 09 00 00 00 00 00 00 ff | ff 00 00 00 00 00 d8 68 |........|.......h|
|00000050| 00 47 d9 6e 02 15 00 00 | 31 b2 00 26 00 00 00 00 |.G.n....|1..&....|
|00000060| 00 00 00 00 00 45 00 00 | 05 c4 ff 00 00 00 00 00 |.....E..|........|
|00000070| 00 00 00 00 00 00 01 01 | 02 64 00 00 00 48 00 48 |........|.d...H.H|
|00000080| 00 01 00 18 03 18 02 64 | 00 24 00 12 03 14 02 52 |.......d|.$.....R|
|00000090| 00 64 00 00 00 00 04 00 | 09 cf 01 74 80 00 00 5f |.d......|...t..._|
|000000a0| 00 10 04 00 09 cf 01 74 | 80 00 01 52 00 10 9c b5 |.......t|...R....|
|000000b0| 00 00 13 37 00 00 00 00 | ff 00 00 00 00 00 00 00 |...7....|........|
|000000c0| 36 a9 00 00 36 a9 00 00 | 36 a9 00 00 3c f3 00 00 |6...6...|6...<...|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 04 00 31 59 | 04 00 0c 14 04 00 18 52 |......1Y|.......R|
|00000110| 04 00 0c 2e 04 00 02 5d | 00 41 52 18 00 41 52 1c |.......]|.AR..AR.|
|00000120| 00 41 52 20 00 3c 00 01 | 00 41 52 10 00 00 00 00 |.AR .<..|.AR.....|
|00000130| 00 00 09 76 0a a8 80 33 | ff ff 00 00 09 00 00 00 |...v...3|........|
|00000140| 00 00 00 ff ff 00 00 00 | 00 00 da a0 00 49 db a6 |........|.....I..|
|00000150| 02 17 00 00 2b ee 00 26 | 00 00 00 00 00 00 00 00 |....+..&|........|
|00000160| 00 45 00 00 0b 82 ff 00 | 00 00 00 00 00 00 00 00 |.E......|........|
|00000170| 00 00 01 01 02 64 00 00 | 00 48 00 48 00 01 00 18 |.....d..|.H.H....|
|00000180| 03 18 02 64 00 24 00 12 | 03 14 02 52 00 64 00 00 |...d.$..|...R.d..|
|00000190| 00 00 04 00 2d ff 00 95 | da f3 00 9b 00 10 04 00 |....-...|........|
|000001a0| 2d ff 00 95 da f3 00 9b | 00 10 9c b5 00 00 0e 3e |-.......|.......>|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 31 b5 00 00 |........|....1...|
|000001c0| 31 b5 00 00 31 b5 00 00 | 3c f3 00 00 00 00 00 00 |1...1...|<.......|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 00 04 0d 0d 0d 0d 00 04 | 0d 0d 0d 0d 00 4f fc 00 |........|.....O..|
|00000210| 5a 02 0a 00 5a 00 10 04 | c9 07 e2 f7 ff 00 15 09 |Z...Z...|........|
|00000220| 00 f7 52 65 76 3a 20 ff | 00 15 09 00 f7 fd 01 f7 |..Rev: .|........|
|00000230| 09 2d 20 50 61 67 65 20 | fd 00 f7 20 2d 09 4a 6f |.- Page |... -.Jo|
|00000240| 6e 61 74 68 61 6e 20 47 | 61 72 79 ff 00 15 12 01 |nathan G|ary.....|
|00000250| f7 0d fc 00 5a 02 0a 00 | 5a 02 10 f7 0d 00 78 00 |....Z...|Z.....x.|
|00000260| 03 00 00 00 48 00 48 00 | 00 00 00 02 f0 02 40 ff |....H.H.|......@.|
|00000270| dc ff ee 02 f4 02 52 01 | 06 05 28 03 fc 00 01 00 |......R.|..(.....|
|00000280| 00 00 48 00 48 00 00 00 | 00 02 f0 02 40 00 48 00 |..H.H...|....@.H.|
|00000290| 20 02 40 0b 40 00 18 00 | 01 01 01 00 00 00 01 27 | .@.@...|.......'|
|000002a0| 0f 00 01 01 01 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 01 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 23 0d 0d ff 00 15 12 01 |........|#.......|
|000002e0| f7 48 79 70 65 72 43 61 | 72 64 20 45 78 74 65 72 |.HyperCa|rd Exter|
|000002f0| 6e 61 6c 73 ff 00 15 12 | 01 f7 0d 0d 00 a5 ff 00 |nals....|........|
|00000300| 03 09 00 f7 f9 03 f7 fd | 03 f7 ff 00 10 0a 00 f7 |........|........|
|00000310| f9 00 f7 44 6f 65 73 20 | 74 ff 00 10 0a 00 f7 f9 |...Does |t.......|
|00000320| 00 f7 68 65 20 70 72 6f | 76 69 73 69 6f 6e 20 66 |..he pro|vision f|
|00000330| 6f 72 20 61 20 75 73 65 | 72 2d 64 65 66 69 6e 65 |or a use|r-define|
|00000340| 64 20 6d 65 73 73 61 67 | 65 73 20 61 6e 64 20 70 |d messag|es and p|
|00000350| 72 6f 70 65 72 74 69 65 | 73 20 70 6f 69 6e 74 20 |ropertie|s point |
|00000360| 74 68 65 20 77 61 79 20 | 66 6f 72 20 61 20 67 65 |the way |for a ge|
|00000370| 6e 65 72 61 6c 69 7a 65 | 64 20 65 78 74 65 72 6e |neralize|d extern|
|00000380| 61 6c 20 6f 62 6a 65 63 | 74 20 6d 65 63 68 61 6e |al objec|t mechan|
|00000390| 69 73 6d 20 66 6f 72 20 | 48 79 70 65 72 43 61 72 |ism for |HyperCar|
|000003a0| 64 3f 0d 00 f9 0d fc 00 | 5a 02 0a 00 5a 01 10 01 |d?......|Z...Z...|
|000003b0| b0 01 f0 08 02 40 02 88 | 02 d0 06 30 f7 4e 6f 74 |.....@..|...0.Not|
|000003c0| 65 20 74 68 61 74 20 74 | 68 65 72 65 20 61 72 65 |e that t|here are|
|000003d0| 20 65 76 65 6e 74 73 20 | 74 68 61 74 20 61 72 65 | events |that are|
|000003e0| 20 73 70 65 63 69 66 69 | 63 20 74 6f 20 70 61 6c | specifi|c to pal|
|000003f0| 65 74 74 65 73 2c 20 ff | 00 16 0a 00 f7 53 68 6f |ettes, .|.....Sho|
|00000400| 77 48 43 50 61 6c 65 74 | 74 65 73 f9 00 f7 ff 00 |wHCPalet|tes.....|
|00000410| 10 0c 00 f7 20 61 6e 64 | 20 ff 00 16 0a 00 f7 48 |.... and| ......H|
|00000420| 69 64 65 48 43 50 61 6c | 65 74 74 65 73 ff 00 10 |ideHCPal|ettes...|
|00000430| 0c 00 f7 f9 00 f7 2e 20 | 20 52 65 73 70 6f 6e 64 |....... | Respond|
|00000440| 69 6e 67 20 74 6f 20 74 | 68 65 73 65 20 65 76 65 |ing to t|hese eve|
|00000450| 6e 74 73 20 70 72 6f 76 | 69 64 65 20 63 6f 6e 73 |nts prov|ide cons|
|00000460| 69 73 74 65 6e 74 20 62 | 65 68 61 76 69 6f 72 20 |istent b|ehavior |
|00000470| 66 6f 72 20 61 6c 6c 20 | 70 61 6c 65 74 74 65 20 |for all |palette |
|00000480| 77 69 6e 64 6f 77 73 2e | ff 00 10 0c 00 f7 0d fc |windows.|........|
|00000490| 00 5a 02 0a 00 5a 01 10 | 01 b0 06 30 f7 0d 03 18 |.Z...Z..|...0....|
|000004a0| fc 00 5a 02 0a 00 5a 01 | 10 01 b0 01 f0 08 02 40 |..Z...Z.|.......@|
|000004b0| 02 88 02 d0 06 30 f7 ff | 00 16 09 00 f7 20 20 50 |.....0..|..... P|
|000004c0| 52 4f 43 45 44 55 52 45 | 20 50 72 6f 63 65 73 73 |ROCEDURE| Process|
|000004d0| 45 76 65 6e 74 20 28 74 | 68 65 57 69 6e 64 6f 77 |Event (t|heWindow|
|000004e0| 3a 20 57 69 6e 64 6f 77 | 50 74 72 3b 0d 09 09 74 |: Window|Ptr;...t|
|000004f0| 68 65 45 76 65 6e 74 3a | 20 45 76 65 6e 74 52 65 |heEvent:| EventRe|
|00000500| 63 6f 72 64 29 3b 0d 09 | 42 45 47 49 4e 0d 09 43 |cord);..|BEGIN..C|
|00000510| 41 53 45 20 74 68 65 45 | 76 65 6e 74 2e 77 68 61 |ASE theE|vent.wha|
|00000520| 74 20 4f 46 0d 09 09 78 | 4f 70 65 6e 45 76 74 3a |t OF...x|OpenEvt:|
|00000530| 20 0d 20 20 20 20 20 20 | 09 09 44 6f 4f 70 65 6e | . |..DoOpen|
|00000540| 53 74 75 66 66 28 74 68 | 65 57 69 6e 64 6f 77 29 |Stuff(th|eWindow)|
|00000550| 3b 0d 20 20 20 20 20 09 | 78 43 75 72 73 6f 72 57 |;. .|xCursorW|
|00000560| 69 74 68 69 6e 3a 20 0d | 20 20 20 20 20 20 09 09 |ithin: .| ..|
|00000570| 70 61 72 61 6d 50 74 72 | 5e 2e 70 61 73 73 46 6c |paramPtr|^.passFl|
|00000580| 61 67 20 3a 3d 20 54 52 | 55 45 3b 0d 20 20 20 20 |ag := TR|UE;. |
|00000590| 20 09 78 47 65 74 50 72 | 6f 70 45 76 74 3a 20 0d | .xGetPr|opEvt: .|
|000005a0| 20 20 20 20 20 20 09 09 | 57 49 54 48 20 58 57 45 | ..|WITH XWE|
|000005b0| 76 65 6e 74 49 6e 66 6f | 50 74 72 28 70 61 72 61 |ventInfo|Ptr(para|
|000005c0| 6d 50 74 72 5e 2e 70 61 | 72 61 6d 73 5b 31 5d 29 |mPtr^.pa|rams[1])|
|000005d0| 5e 20 44 4f 0d 20 20 20 | 20 20 20 20 09 09 09 65 |^ DO. | ...e|
|000005e0| 76 65 6e 74 52 65 73 75 | 6c 74 20 3a 3d 20 47 65 |ventResu|lt := Ge|
|000005f0| 74 50 72 6f 70 65 72 74 | 79 28 74 68 65 57 69 6e |tPropert|y(theWin|
|00000600| 64 6f 77 2c 20 53 74 72 | 69 6e 67 50 74 72 28 65 |dow, Str|ingPtr(e|
|00000610| 76 65 6e 74 50 61 72 61 | 6d 73 5b 31 5d 29 29 3b |ventPara|ms[1]));|
|00000620| 0d 20 20 20 20 20 09 78 | 53 65 74 50 72 6f 70 45 |. .x|SetPropE|
|00000630| 76 74 3a 20 0d 20 20 20 | 20 20 20 09 09 57 49 54 |vt: . | ..WIT|
|00000640| 48 20 58 57 45 76 65 6e | 74 49 6e 66 6f 50 74 72 |H XWEven|tInfoPtr|
|00000650| 28 70 61 72 61 6d 50 74 | 72 5e 2e 70 61 72 61 6d |(paramPt|r^.param|
|00000660| 73 5b 31 5d 29 5e 20 44 | 4f 0d 20 20 20 20 20 20 |s[1])^ D|O. |
|00000670| 20 09 09 09 53 65 74 50 | 72 6f 70 65 72 74 79 28 | ...SetP|roperty(|
|00000680| 74 68 65 57 69 6e 64 6f | 77 2c 53 74 72 69 6e 67 |theWindo|w,String|
|00000690| 50 74 72 28 65 76 65 6e | 74 50 61 72 61 6d 73 5b |Ptr(even|tParams[|
|000006a0| 31 5d 29 2c 48 61 6e 64 | 6c 65 28 65 76 65 6e 74 |1]),Hand|le(event|
|000006b0| 50 61 72 61 6d 73 5b 32 | 5d 29 29 3b 0d 20 20 20 |Params[2|]));. |
|000006c0| 20 20 09 78 48 69 64 65 | 50 61 6c 65 74 74 65 73 | .xHide|Palettes|
|000006d0| 45 76 74 3a 20 0d 20 20 | 20 20 20 20 09 09 48 69 |Evt: . | ..Hi|
|000006e0| 64 65 57 69 6e 64 6f 77 | 28 74 68 65 57 69 6e 64 |deWindow|(theWind|
|000006f0| 6f 77 29 3b 0d 20 20 20 | 20 20 09 78 53 68 6f 77 |ow);. | .xShow|
|00000700| 50 61 6c 65 74 74 65 73 | 45 76 74 3a 20 0d 20 20 |Palettes|Evt: . |
|00000710| 20 20 20 20 09 09 53 68 | 6f 77 57 69 6e 64 6f 77 | ..Sh|owWindow|
|00000720| 28 74 68 65 57 69 6e 64 | 6f 77 29 3b 0d 20 20 20 |(theWind|ow);. |
|00000730| 20 20 09 78 43 6c 6f 73 | 65 45 76 74 3a 20 0d 20 | .xClos|eEvt: . |
|00000740| 20 20 20 20 20 09 09 42 | 45 47 49 4e 0d 20 20 20 | ..B|EGIN. |
|00000750| 20 20 20 20 09 09 4b 69 | 6c 6c 58 50 61 6c 65 74 | ..Ki|llXPalet|
|00000760| 74 65 28 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 20 |te(theWi|ndow);. |
|00000770| 20 20 20 20 20 20 09 09 | 70 61 72 61 6d 50 74 72 | ..|paramPtr|
|00000780| 5e 2e 70 61 73 73 46 6c | 61 67 20 3a 3d 20 54 52 |^.passFl|ag := TR|
|00000790| 55 45 3b 0d 20 20 20 20 | 20 20 09 09 45 4e 44 3b |UE;. | ..END;|
|000007a0| 0d 20 20 20 20 09 45 4e | 44 3b 20 7b 63 61 73 65 |. .EN|D; {case|
|000007b0| 7d 0d 09 45 4e 44 3b 0d | 02 15 0d 54 68 69 73 20 |}..END;.|...This |
|000007c0| 70 61 72 61 6d 65 74 65 | 72 20 62 6c 6f 63 6b 20 |paramete|r block |
|000007d0| 75 73 75 61 6c 6c 79 20 | 63 6f 6e 74 61 69 6e 73 |usually |contains|
|000007e0| 20 61 6e 20 61 72 72 61 | 79 20 6f 66 20 70 61 72 | an arra|y of par|
|000007f0| 61 6d 65 74 65 72 73 20 | 66 6f 72 20 79 6f 75 72 |ameters |for your|
|00000800| 20 58 43 4d 44 20 74 6f | 20 70 61 72 73 65 2c 20 | XCMD to| parse, |
|00000810| 61 6e 64 20 69 6e 63 6c | 75 64 65 73 20 61 20 68 |and incl|udes a h|
|00000820| 61 6e 64 6c 65 20 69 6e | 20 77 68 69 63 68 20 79 |andle in| which y|
|00000830| 6f 75 20 63 61 6e 20 72 | 65 74 75 72 6e 20 61 20 |ou can r|eturn a |
|00000840| 76 61 6c 75 65 2e 20 20 | 46 6f 72 20 58 43 4d 44 |value. |For XCMD|
|00000850| 73 2c 20 74 68 65 20 72 | 65 74 75 72 6e 20 76 61 |s, the r|eturn va|
|00000860| 6c 75 65 20 69 73 20 61 | 63 63 65 73 73 65 64 20 |lue is a|ccessed |
|00000870| 62 79 20 74 68 65 20 66 | 75 6e 63 74 69 6f 6e 20 |by the f|unction |
|00000880| ff 00 04 09 00 f7 72 65 | 73 75 6c 74 f9 00 f7 ff |......re|sult....|
|00000890| 00 10 0c 00 f7 2e 20 20 | 46 6f 72 20 58 46 43 4e |...... |For XFCN|
|000008a0| 73 2c 20 74 68 65 20 72 | 65 74 75 72 6e 20 76 61 |s, the r|eturn va|
|000008b0| 6c 75 65 20 69 73 20 74 | 68 65 20 76 61 6c 75 65 |lue is t|he value|
|000008c0| 20 6f 66 20 74 68 65 20 | 66 75 6e 63 74 69 6f 6e | of the |function|
|000008d0| 2e 20 20 49 66 20 79 6f | 75 72 20 58 43 4d 44 20 |. If yo|ur XCMD |
|000008e0| 63 72 65 61 74 65 73 20 | 61 6e 20 65 78 74 65 72 |creates |an exter|
|000008f0| 6e 61 6c 20 77 69 6e 64 | 6f 77 2c 20 48 79 70 65 |nal wind|ow, Hype|
|00000900| 72 43 61 72 64 20 77 69 | 6c 6c 20 63 61 6c 6c 20 |rCard wi|ll call |
|00000910| 79 6f 75 72 20 58 43 4d | 44 20 77 69 74 68 20 61 |your XCM|D with a|
|00000920| 20 70 61 72 61 6d 65 74 | 65 72 20 63 6f 75 6e 74 | paramet|er count|
|00000930| 20 6f 66 20 2d 31 2e 20 | 20 54 68 69 73 20 6c 65 | of -1. | This le|
|00000940| 74 73 20 79 6f 75 20 6b | 6e 6f 77 20 74 68 61 74 |ts you k|now that|
|00000950| 20 48 79 70 65 72 43 61 | 72 64 20 69 73 20 70 61 | HyperCa|rd is pa|
|00000960| 73 73 69 6e 67 20 61 6e | 20 65 76 65 6e 74 20 74 |ssing an| event t|
|00000970| 6f 20 79 6f 75 72 20 77 | 69 6e 64 6f 77 2e 20 20 |o your w|indow. |
|00000980| 54 68 65 20 66 69 72 73 | 74 20 70 61 72 61 6d 65 |The firs|t parame|
|00000990| 74 65 72 20 77 69 6c 6c | 20 74 68 65 6e 20 63 6f |ter will| then co|
|000009a0| 6e 74 61 69 6e 20 74 68 | 65 20 61 64 64 72 65 73 |ntain th|e addres|
|000009b0| 73 20 6f 66 20 61 6e 20 | 65 76 65 6e 74 20 70 61 |s of an |event pa|
|000009c0| 72 61 6d 65 74 65 72 20 | 62 6c 6f 63 6b 2e 0d 02 |rameter |block...|
|000009d0| 43 ff 00 10 0c 05 f7 45 | 78 74 65 72 6e 61 6c 20 |C......E|xternal |
|000009e0| 57 69 6e 64 6f 77 73 20 | 61 6e 64 20 45 76 65 6e |Windows |and Even|
|000009f0| 74 20 4d 61 6e 61 67 65 | 6d 65 6e 74 ff 00 10 0c |t Manage|ment....|
|00000a00| 00 f7 0d 45 76 65 6e 74 | 20 6d 61 6e 61 67 65 6d |...Event| managem|
|00000a10| 65 6e 74 20 66 6f 72 20 | 65 78 74 65 72 6e 61 6c |ent for |external|
|00000a20| 20 77 69 6e 64 6f 77 73 | 20 69 73 20 73 69 6d 69 | windows| is simi|
|00000a30| 6c 61 72 20 74 6f 20 6d | 61 6e 61 67 69 6e 67 20 |lar to m|anaging |
|00000a40| 77 69 6e 64 6f 77 73 20 | 77 69 74 68 69 6e 20 61 |windows |within a|
|00000a50| 20 4d 61 63 69 6e 74 6f | 73 68 20 61 70 70 6c 69 | Macinto|sh appli|
|00000a60| 63 61 74 69 6f 6e 2e 20 | 20 54 68 65 72 65 20 61 |cation. | There a|
|00000a70| 72 65 20 61 20 6e 75 6d | 62 65 72 20 6f 66 20 48 |re a num|ber of H|
|00000a80| 79 70 65 72 43 61 72 64 | 2d 73 70 65 63 69 66 69 |yperCard|-specifi|
|00000a90| 63 20 65 76 65 6e 74 73 | 20 74 68 61 74 20 63 61 |c events| that ca|
|00000aa0| 6e 20 62 65 20 68 61 6e | 64 6c 65 64 2e 20 20 48 |n be han|dled. H|
|00000ab0| 79 70 65 72 54 61 6c 6b | 20 73 63 72 69 70 74 73 |yperTalk| scripts|
|00000ac0| 20 63 61 6e 20 73 65 6e | 64 20 6d 65 73 73 61 67 | can sen|d messag|
|00000ad0| 65 73 20 74 6f 20 65 78 | 74 65 72 6e 61 6c 20 77 |es to ex|ternal w|
|00000ae0| 69 6e 64 6f 77 73 2c 20 | 61 6e 64 20 63 61 6e 20 |indows, |and can |
|00000af0| 67 65 74 20 61 6e 64 20 | 73 65 74 20 74 68 65 20 |get and |set the |
|00000b00| 76 61 6c 75 65 20 6f 66 | 20 61 20 73 65 74 20 6f |value of| a set o|
|00000b10| 66 20 77 69 6e 64 6f 77 | 20 70 72 6f 70 65 72 74 |f window| propert|
|00000b20| 69 65 73 20 74 68 61 74 | 20 79 6f 75 20 64 65 66 |ies that| you def|
|00000b30| 69 6e 65 ff 00 10 0a 00 | f7 f9 03 f7 f4 f9 00 f7 |ine.....|........|
|00000b40| ff 00 10 0c 00 f7 f9 00 | f7 ff 00 10 0c 00 f7 2e |........|........|
|00000b50| 20 20 59 6f 75 20 63 61 | 6e 20 63 68 6f 6f 73 65 | You ca|n choose|
|00000b60| 20 74 68 65 20 73 65 74 | 20 6f 66 20 6d 65 73 73 | the set| of mess|
|00000b70| 61 67 65 73 20 61 6e 64 | 20 70 72 6f 70 65 72 74 |ages and| propert|
|00000b80| 69 65 73 20 79 6f 75 20 | 77 69 73 68 20 74 6f 20 |ies you |wish to |
|00000b90| 69 6d 70 6c 65 6d 65 6e | 74 2c 20 74 68 6f 75 67 |implemen|t, thoug|
|00000ba0| 68 20 48 79 70 65 72 43 | 61 72 64 20 64 65 66 69 |h HyperC|ard defi|
|00000bb0| 6e 65 73 20 61 20 66 65 | 77 20 75 73 65 66 75 6c |nes a fe|w useful|
|00000bc0| 20 6f 6e 65 73 20 66 6f | 72 20 79 6f 75 20 28 ff | ones fo|r you (.|
|00000bd0| 00 04 09 00 f7 72 65 63 | 74 f9 00 f7 ff 00 10 0c |.....rec|t.......|
|00000be0| 00 f7 2c 20 ff 00 04 09 | 00 f7 6c 6f 63 f9 00 f7 |.., ....|..loc...|
|00000bf0| ff 00 10 0c 00 f7 20 61 | 6e 64 20 ff 00 04 09 00 |...... a|nd .....|
|00000c00| f7 76 69 73 69 62 6c 65 | f9 00 f7 ff 00 10 0c 00 |.visible|........|
|00000c10| f7 29 2e 0d 00 18 04 00 | 02 00 00 40 04 00 02 06 |.)......|...@....|
|00000c20| 00 40 24 00 02 d7 00 44 | 64 00 02 0c 00 25 00 06 |.@$....D|d....%..|
|00000c30| 00 08 a3 63 7e 6f 00 c7 | ff 00 10 09 00 f7 f9 05 |...c~o..|........|
|00000c40| f7 fd 03 f7 f9 00 f7 ff | 00 10 0a 00 f7 4c 6f 77 |........|.....Low|
|00000c50| 20 6d 65 6d 6f 72 79 20 | 67 6c 6f 62 61 6c 73 20 | memory |globals |
|00000c60| 6e 6f 20 6c 6f 6e 67 65 | 72 20 65 78 69 73 74 2e |no longe|r exist.|
|00000c70| 20 20 54 68 65 20 72 65 | 61 73 6f 6e 20 74 68 65 | The re|ason the|
|00000c80| 79 20 63 6f 6e 74 69 6e | 75 65 20 74 6f 20 20 77 |y contin|ue to w|
|00000c90| 6f 72 6b 20 69 73 20 64 | 75 65 20 74 6f 20 74 68 |ork is d|ue to th|
|00000ca0| 65 20 70 73 79 63 68 69 | 63 20 65 6e 65 72 67 79 |e psychi|c energy|
|00000cb0| 20 67 65 6e 65 72 61 74 | 65 64 20 62 79 20 74 68 | generat|ed by th|
|00000cc0| 65 20 63 6f 6c 6c 65 63 | 74 69 76 65 20 77 69 6c |e collec|tive wil|
|00000cd0| 6c 73 20 6f 66 20 4d 61 | 63 20 70 72 6f 67 72 61 |ls of Ma|c progra|
|00000ce0| 6d 6d 65 72 73 20 74 68 | 72 6f 75 67 68 6f 75 74 |mmers th|roughout|
|00000cf0| 20 74 68 65 20 75 6e 69 | 76 65 72 73 65 2e 0d 03 | the uni|verse...|
|00000d00| f4 0d ff 00 10 0c 05 f7 | 57 68 61 74 20 49 73 20 |........|What Is |
|00000d10| 41 6e 20 58 43 4d 44 3f | ff 00 10 0c 00 f7 f9 00 |An XCMD?|........|
|00000d20| f7 0d 58 43 4d 44 73 20 | 61 72 65 20 73 74 61 6e |..XCMDs |are stan|
|00000d30| 64 20 61 6c 6f 6e 65 20 | 63 6f 64 65 20 72 65 73 |d alone |code res|
|00000d40| 6f 75 72 63 65 73 20 77 | 69 74 68 20 61 20 73 69 |ources w|ith a si|
|00000d50| 6e 67 6c 65 20 65 6e 74 | 72 79 20 70 6f 69 6e 74 |ngle ent|ry point|
|00000d60| 2e 20 20 54 68 61 74 20 | 6d 65 61 6e 73 20 74 68 |. That |means th|
|00000d70| 61 74 20 74 68 65 79 20 | 61 72 65 20 61 20 62 6c |at they |are a bl|
|00000d80| 6f 63 6b 20 6f 66 20 36 | 38 30 30 30 20 6d 61 63 |ock of 6|8000 mac|
|00000d90| 68 69 6e 65 20 69 6e 73 | 74 72 75 63 74 69 6f 6e |hine ins|truction|
|00000da0| 73 20 73 74 6f 72 65 64 | 20 69 6e 20 74 68 65 20 |s stored| in the |
|00000db0| 72 65 73 6f 75 72 63 65 | 20 66 6f 72 6b 20 6f 66 |resource| fork of|
|00000dc0| 20 61 20 73 74 61 63 6b | 20 6f 72 20 74 68 65 20 | a stack| or the |
|00000dd0| 48 79 70 65 72 43 61 72 | 64 20 61 70 70 6c 69 63 |HyperCar|d applic|
|00000de0| 61 74 69 6f 6e 2e 20 20 | 58 43 4d 44 73 20 61 63 |ation. |XCMDs ac|
|00000df0| 74 20 6a 75 73 74 20 6c | 69 6b 65 20 68 61 6e 64 |t just l|ike hand|
|00000e00| 6c 65 72 73 20 77 72 69 | 74 74 65 6e 20 69 6e 20 |lers wri|tten in |
|00000e10| 48 79 70 65 72 54 61 6c | 6b 20 74 6f 20 74 68 65 |HyperTal|k to the|
|00000e20| 20 73 63 72 69 70 74 65 | 72 2e 20 20 58 46 43 4e | scripte|r. XFCN|
|00000e30| 73 20 6c 6f 6f 6b 20 6c | 69 6b 65 20 66 75 6e 63 |s look l|ike func|
|00000e40| 74 69 6f 6e 73 20 d0 74 | 68 61 74 20 69 73 20 74 |tions .t|hat is t|
|00000e50| 68 65 20 6f 6e 6c 79 20 | 64 69 66 66 65 72 65 6e |he only |differen|
|00000e60| 63 65 20 62 65 74 77 65 | 65 6e 20 58 43 4d 44 73 |ce betwe|en XCMDs|
|00000e70| 20 61 6e 64 20 58 46 43 | 4e 73 2e ff 00 10 0c 00 | and XFC|Ns......|
|00000e80| f7 0d 0d ff 00 10 0c 05 | f7 48 6f 77 20 58 43 4d |........|.How XCM|
|00000e90| 44 73 20 41 72 65 20 45 | 78 65 63 75 74 65 64 ff |Ds Are E|xecuted.|
|00000ea0| 00 10 0c 00 f7 0d 57 68 | 65 6e 20 48 79 70 65 72 |......Wh|en Hyper|
|00000eb0| 43 61 72 64 20 73 65 61 | 72 63 68 65 73 20 74 68 |Card sea|rches th|
|00000ec0| 65 20 69 6e 68 65 72 69 | 74 61 6e 63 65 20 68 69 |e inheri|tance hi|
|00000ed0| 65 72 61 72 63 68 79 20 | 66 6f 72 20 61 20 68 61 |erarchy |for a ha|
|00000ee0| 6e 64 6c 65 72 20 66 6f | 72 20 61 20 6d 65 73 73 |ndler fo|r a mess|
|00000ef0| 61 67 65 20 6f 72 20 66 | 75 6e 63 74 69 6f 6e 2c |age or f|unction,|
|00000f00| 20 69 74 20 63 68 65 63 | 6b 73 20 74 68 65 20 72 | it chec|ks the r|
|00000f10| 65 73 6f 75 72 63 65 20 | 66 6f 72 6b 20 6f 66 20 |esource |fork of |
|00000f20| 74 68 65 20 73 74 61 63 | 6b 73 20 69 6e 20 74 68 |the stac|ks in th|
|00000f30| 65 20 68 69 65 72 61 72 | 63 68 79 20 61 66 74 65 |e hierar|chy afte|
|00000f40| 72 20 63 68 65 63 6b 69 | 6e 67 20 74 68 65 20 73 |r checki|ng the s|
|00000f50| 74 61 63 6b 73 27 20 73 | 63 72 69 70 74 73 2e 20 |tacks' s|cripts. |
|00000f60| 20 49 74 20 61 6c 73 6f | 20 63 68 65 63 6b 73 20 | It also| checks |
|00000f70| 74 68 65 20 72 65 73 6f | 75 72 63 65 20 66 6f 72 |the reso|urce for|
|00000f80| 6b 20 6f 66 20 74 68 65 | 20 48 79 70 65 72 43 61 |k of the| HyperCa|
|00000f90| 72 64 20 61 70 70 6c 69 | 61 74 69 6f 6e 2e 20 20 |rd appli|ation. |
|00000fa0| 49 66 20 69 74 20 66 69 | 6e 64 73 20 61 20 72 65 |If it fi|nds a re|
|00000fb0| 73 6f 75 72 63 65 20 6f | 66 20 74 79 70 65 20 58 |source o|f type X|
|00000fc0| 43 4d 44 20 28 6f 72 20 | 58 46 43 4e 20 64 65 70 |CMD (or |XFCN dep|
|00000fd0| 65 6e 64 69 6e 67 20 6f | 6e 20 74 68 65 20 63 6f |ending o|n the co|
|00000fe0| 6e 74 65 78 74 20 6f 66 | 20 74 68 65 20 73 74 61 |ntext of| the sta|
|00000ff0| 74 65 6d 65 6e 74 20 62 | 65 69 6e 67 20 65 78 65 |tement b|eing exe|
|00001000| 63 75 74 65 64 29 20 74 | 68 61 74 20 6d 61 74 63 |cuted) t|hat matc|
|00001010| 68 65 73 20 74 68 65 20 | 6e 61 6d 65 20 6f 66 20 |hes the |name of |
|00001020| 74 68 65 20 68 61 6e 64 | 6c 65 72 20 6f 72 20 66 |the hand|ler or f|
|00001030| 75 6e 63 74 69 6f 6e 2c | 20 69 74 20 6c 6f 61 64 |unction,| it load|
|00001040| 73 20 74 68 65 20 58 43 | 4d 44 20 72 65 73 6f 75 |s the XC|MD resou|
|00001050| 72 63 65 20 69 6e 74 6f | 20 6d 65 6d 6f 72 79 2e |rce into| memory.|
|00001060| 20 20 49 74 20 74 68 65 | 6e 20 63 6f 6e 73 74 72 | It the|n constr|
|00001070| 75 63 74 73 20 61 20 70 | 61 72 61 6d 65 74 65 72 |ucts a p|arameter|
|00001080| 20 62 6c 6f 63 6b 20 61 | 6e 64 20 70 6c 61 63 65 | block a|nd place|
|00001090| 73 20 74 68 65 20 61 64 | 64 72 65 73 73 20 6f 66 |s the ad|dress of|
|000010a0| 20 74 68 65 20 70 61 72 | 61 6d 65 74 65 72 20 62 | the par|ameter b|
|000010b0| 6c 6f 63 6b 20 6f 6e 20 | 74 68 65 20 73 74 61 63 |lock on |the stac|
|000010c0| 6b 20 61 6e 64 20 4a 53 | 52 73 20 69 6e 74 6f 20 |k and JS|Rs into |
|000010d0| 74 68 65 20 66 69 72 73 | 74 20 69 6e 73 74 72 75 |the firs|t instru|
|000010e0| 63 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 58 43 4d |ction of| the XCM|
|000010f0| 44 2e 20 20 0d 02 ea fc | 00 5a 02 0a 00 5a 01 10 |D. ....|.Z...Z..|
|00001100| 01 b0 06 30 f7 ff 00 10 | 0c 00 f7 f5 ff 00 10 0c |...0....|........|
|00001110| 05 f7 49 6e 74 72 6f 64 | 75 63 74 69 6f 6e f9 00 |..Introd|uction..|
|00001120| f7 ff 00 10 0c 00 f7 0d | f6 48 79 70 65 72 43 61 |........|.HyperCa|
|00001130| 72 64 20 69 73 20 61 20 | 70 6f 77 65 72 66 75 6c |rd is a |powerful|
|00001140| 20 61 6e 64 20 65 61 73 | 79 2d 74 6f 2d 75 73 65 | and eas|y-to-use|
|00001150| 20 64 65 76 65 6c 6f 70 | 6d 65 6e 74 20 65 6e 76 | develop|ment env|
|00001160| 69 72 6f 6e 6d 65 6e 74 | 2e 20 20 48 6f 77 65 76 |ironment|. Howev|
|00001170| 65 72 2c 20 73 6f 6d 65 | 20 74 61 73 6b 73 20 61 |er, some| tasks a|
|00001180| 72 65 20 64 69 66 66 69 | 63 75 6c 74 2c 20 69 66 |re diffi|cult, if|
|00001190| 20 6e 6f 74 20 69 6d 70 | 6f 73 73 69 62 6c 65 2c | not imp|ossible,|
|000011a0| 20 74 6f 20 69 6d 70 6c | 65 6d 65 6e 74 20 69 6e | to impl|ement in|
|000011b0| 20 48 79 70 65 72 54 61 | 6c 6b 2e 20 20 46 6f 72 | HyperTa|lk. For|
|000011c0| 74 75 6e 61 74 65 6c 79 | 20 48 79 70 65 72 43 61 |tunately| HyperCa|
|000011d0| 72 64 27 73 20 64 65 73 | 69 67 6e 65 72 73 20 68 |rd's des|igners h|
|000011e0| 61 64 20 74 68 65 20 66 | 6f 72 65 73 69 67 68 74 |ad the f|oresight|
|000011f0| 20 74 6f 20 69 6e 63 6c | 75 64 65 20 61 6e 20 65 | to incl|ude an e|
|00001200| 6c 65 67 61 6e 74 20 6d | 65 63 68 61 6e 69 73 6d |legant m|echanism|
|00001210| 20 66 6f 72 20 65 78 65 | 63 75 74 69 6e 67 20 63 | for exe|cuting c|
|00001220| 6f 64 65 20 72 65 73 6f | 75 72 63 65 73 2c 20 63 |ode reso|urces, c|
|00001230| 61 6c 6c 65 64 20 58 43 | 4d 44 73 20 61 6e 64 20 |alled XC|MDs and |
|00001240| 58 46 43 4e 73 2c 20 63 | 72 65 61 74 65 64 20 77 |XFCNs, c|reated w|
|00001250| 69 74 68 20 63 6f 6d 70 | 69 6c 65 64 20 6c 61 6e |ith comp|iled lan|
|00001260| 67 75 61 67 65 73 20 6c | 69 6b 65 20 50 61 73 63 |guages l|ike Pasc|
|00001270| 61 6c 20 61 6e 64 20 43 | 2e 20 20 58 43 4d 44 73 |al and C|. XCMDs|
|00001280| 20 72 65 70 65 73 65 6e | 74 20 61 6e 20 69 6d 70 | repesen|t an imp|
|00001290| 6f 72 74 61 6e 74 20 73 | 6f 75 72 63 65 20 6f 66 |ortant s|ource of|
|000012a0| 20 6f 70 70 6f 72 74 75 | 6e 69 74 69 65 73 20 74 | opportu|nities t|
|000012b0| 6f 20 64 65 76 65 6c 6f | 70 65 72 73 2e 20 20 57 |o develo|pers. W|
|000012c0| 69 74 68 20 74 68 65 20 | 72 65 6c 65 61 73 65 20 |ith the |release |
|000012d0| 6f 66 20 48 79 70 65 72 | 43 61 72 64 20 32 2c 30 |of Hyper|Card 2,0|
|000012e0| 2c 20 74 68 65 20 58 43 | 4d 44 20 69 6e 74 65 72 |, the XC|MD inter|
|000012f0| 66 61 63 65 20 77 61 73 | 20 67 72 65 61 74 6c 79 |face was| greatly|
|00001300| 20 65 6e 68 61 6e 63 65 | 64 20 74 6f 20 61 63 63 | enhance|d to acc|
|00001310| 6f 6d 6d 6f 64 61 74 65 | 20 77 69 6e 64 6f 77 73 |ommodate| windows|
|00001320| 20 63 72 65 61 74 65 64 | 20 62 79 20 58 43 4d 44 | created| by XCMD|
|00001330| 73 2c 20 61 6e 64 20 61 | 20 6d 65 63 68 61 6e 69 |s, and a| mechani|
|00001340| 73 6d 20 66 6f 72 20 65 | 76 65 6e 74 20 68 61 6e |sm for e|vent han|
|00001350| 64 6c 69 6e 67 20 66 6f | 72 20 74 68 65 73 65 20 |dling fo|r these |
|00001360| 77 69 6e 64 6f 77 73 20 | 77 61 73 20 70 75 74 20 |windows |was put |
|00001370| 69 6e 20 70 6c 61 63 65 | 2e 20 20 54 68 65 73 65 |in place|. These|
|00001380| 20 6e 65 77 20 63 61 70 | 61 62 69 6c 69 74 69 65 | new cap|abilitie|
|00001390| 73 20 72 65 6d 6f 76 65 | 64 20 61 20 6e 75 6d 62 |s remove|d a numb|
|000013a0| 65 72 20 6f 66 20 6f 62 | 73 74 61 63 6c 65 73 20 |er of ob|stacles |
|000013b0| 74 68 61 74 20 66 72 75 | 73 74 72 61 74 65 64 20 |that fru|strated |
|000013c0| 64 65 76 65 6c 6f 70 65 | 72 73 20 6f 66 20 58 43 |develope|rs of XC|
|000013d0| 4d 44 73 20 69 6e 20 74 | 68 65 20 70 61 73 74 2e |MDs in t|he past.|
|000013e0| 0d 04 6f 0d 49 66 20 79 | 6f 75 20 6e 65 65 64 20 |..o.If y|ou need |
|000013f0| 74 6f 20 73 74 6f 72 65 | 20 64 61 74 61 20 62 65 |to store| data be|
|00001400| 74 77 65 65 6e 20 69 6e | 76 6f 63 61 74 69 6f 6e |tween in|vocation|
|00001410| 73 20 6f 66 20 79 6f 75 | 72 20 58 43 4d 44 2c 20 |s of you|r XCMD, |
|00001420| 61 6e 64 20 79 6f 75 20 | 69 6e 76 61 72 69 61 62 |and you |invariab|
|00001430| 6c 79 20 64 6f 2c 20 79 | 6f 75 20 73 68 6f 75 6c |ly do, y|ou shoul|
|00001440| 64 20 64 65 63 6c 61 72 | 65 20 61 20 72 65 63 6f |d declar|e a reco|
|00001450| 72 64 20 74 79 70 65 20 | 63 6f 6e 74 61 69 6e 69 |rd type |containi|
|00001460| 6e 67 20 61 6c 6c 20 6f | 66 20 74 68 65 20 66 69 |ng all o|f the fi|
|00001470| 65 6c 64 73 20 6e 65 65 | 64 65 64 20 62 65 74 77 |elds nee|ded betw|
|00001480| 65 65 6e 20 69 6e 76 6f | 63 61 74 69 6f 6e 73 2c |een invo|cations,|
|00001490| 20 61 6e 64 20 73 74 6f | 72 65 20 61 20 68 61 6e | and sto|re a han|
|000014a0| 64 6c 65 20 74 6f 20 61 | 20 72 65 6c 6f 63 61 74 |dle to a| relocat|
|000014b0| 61 62 6c 65 20 62 6c 6f | 63 6b 20 63 6f 6e 74 61 |able blo|ck conta|
|000014c0| 69 6e 69 6e 67 20 6f 6e | 65 20 6f 66 20 74 68 65 |ining on|e of the|
|000014d0| 73 65 20 72 65 63 6f 72 | 64 73 20 69 6e 20 74 68 |se recor|ds in th|
|000014e0| 65 20 ff 00 16 0a 00 f7 | 72 65 66 43 6f 6e ff 00 |e ......|refCon..|
|000014f0| 10 0c 00 f7 20 66 69 65 | 6c 64 20 6f 66 20 74 68 |.... fie|ld of th|
|00001500| 65 20 77 69 6e 64 6f 77 | 20 72 65 63 6f 72 64 20 |e window| record |
|00001510| 75 73 69 6e 67 20 74 68 | 65 20 54 6f 6f 6c 62 6f |using th|e Toolbo|
|00001520| 78 20 54 72 61 70 20 ff | 00 16 0a 00 f7 53 65 74 |x Trap .|.....Set|
|00001530| 57 52 65 66 43 6f 6e f9 | 00 f7 ff 00 10 0c 00 f7 |WRefCon.|........|
|00001540| 2e 20 20 59 6f 75 20 74 | 68 65 20 72 65 74 72 69 |. You t|he retri|
|00001550| 65 76 65 20 74 68 65 20 | 64 61 74 61 20 64 75 72 |eve the |data dur|
|00001560| 69 6e 67 20 6c 61 74 65 | 72 20 69 6e 76 6f 63 61 |ing late|r invoca|
|00001570| 74 69 6f 6e 73 20 77 69 | 74 68 20 ff 00 16 0a 00 |tions wi|th .....|
|00001580| f7 47 ff 00 16 0a 00 f7 | 65 74 57 52 65 66 43 6f |.G......|etWRefCo|
|00001590| 6e f9 00 f7 ff 00 10 0c | 00 f7 2e 0d 0d 42 65 6c |n.......|.....Bel|
|000015a0| 6f 77 20 49 20 68 61 76 | 65 20 69 6e 63 6c 75 64 |ow I hav|e includ|
|000015b0| 65 64 20 74 68 65 20 63 | 6f 64 65 20 66 72 6f 6d |ed the c|ode from|
|000015c0| 20 61 6e 20 65 76 65 6e | 74 20 64 69 73 70 61 74 | an even|t dispat|
|000015d0| 63 68 69 6e 67 20 70 72 | 6f 63 65 64 75 72 65 20 |ching pr|ocedure |
|000015e0| 66 72 6f 6d 20 6d 79 20 | 48 65 6c 70 57 69 6e 64 |from my |HelpWind|
|000015f0| 6f 77 20 58 43 4d 44 20 | 28 61 76 61 69 6c 61 62 |ow XCMD |(availab|
|00001600| 6c 65 20 6f 6e 20 74 68 | 65 20 70 72 6f 63 65 65 |le on th|e procee|
|00001610| 64 69 6e 67 73 20 64 69 | 73 6b 29 2e 20 20 54 68 |dings di|sk). Th|
|00001620| 65 20 65 76 65 6e 74 20 | 6d 61 6e 61 67 65 6d 65 |e event |manageme|
|00001630| 6e 74 20 63 6f 64 65 20 | 74 68 61 74 20 69 73 20 |nt code |that is |
|00001640| 73 69 6d 69 6c 61 72 20 | 74 6f 20 20 4d 61 63 20 |similar |to Mac |
|00001650| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 20 68 61 73 |applicat|ions has|
|00001660| 20 62 65 65 6e 20 72 65 | 6d 6f 76 65 64 2e 20 20 | been re|moved. |
|00001670| 54 68 69 73 20 58 43 4d | 44 20 61 6c 73 6f 20 69 |This XCM|D also i|
|00001680| 6d 70 6c 65 6d 65 6e 74 | 73 20 61 20 ff 00 04 09 |mplement|s a ....|
|00001690| 00 f7 74 65 78 74 f9 00 | f7 ff 00 10 0c 00 f7 20 |..text..|....... |
|000016a0| 70 72 6f 70 65 72 74 79 | 20 77 68 69 63 68 20 63 |property| which c|
|000016b0| 61 6e 20 62 65 20 73 65 | 74 2c 20 75 70 6f 6e 20 |an be se|t, upon |
|000016c0| 77 68 69 63 68 20 74 68 | 65 20 77 69 6e 64 6f 77 |which th|e window|
|000016d0| 20 69 73 20 61 75 74 6f | 6d 61 74 69 63 61 6c 6c | is auto|maticall|
|000016e0| 79 20 75 70 64 61 74 65 | 64 2e 20 20 57 68 65 6e |y update|d. When|
|000016f0| 20 61 20 ff 00 16 0a 00 | f7 78 53 65 74 50 72 6f | a .....|.xSetPro|
|00001700| 70 45 76 74 f9 00 f7 ff | 00 10 0c 00 f7 20 65 76 |pEvt....|..... ev|
|00001710| 65 6e 74 20 69 73 20 72 | 65 63 65 69 76 65 64 2c |ent is r|eceived,|
|00001720| 20 74 68 65 20 66 69 72 | 73 74 20 65 76 65 6e 74 | the fir|st event|
|00001730| 20 70 61 72 61 6d 65 74 | 65 72 20 69 73 20 74 68 | paramet|er is th|
|00001740| 65 20 6e 61 6d 65 20 6f | 66 20 74 68 65 20 70 72 |e name o|f the pr|
|00001750| 6f 70 65 72 74 79 20 61 | 6e 64 20 74 68 65 20 73 |operty a|nd the s|
|00001760| 65 63 6f 6e 64 20 69 73 | 20 74 68 65 20 6e 65 77 |econd is| the new|
|00001770| 20 76 61 6c 75 65 2e 20 | 20 57 68 65 6e 20 61 20 | value. | When a |
|00001780| ff 00 16 0a 00 f7 78 47 | 65 74 50 72 6f 70 45 76 |......xG|etPropEv|
|00001790| 74 ff 00 10 0c 00 f7 f9 | 00 f7 20 69 73 20 72 65 |t.......|.. is re|
|000017a0| 63 65 69 76 65 64 2c 20 | 74 68 65 20 66 69 72 73 |ceived, |the firs|
|000017b0| 74 20 65 76 65 6e 74 20 | 70 61 72 61 6d 65 74 65 |t event |paramete|
|000017c0| 72 20 69 73 20 74 68 65 | 20 6e 61 6d 65 20 6f 66 |r is the| name of|
|000017d0| 20 74 68 65 20 70 72 6f | 70 65 72 74 79 2e 20 20 | the pro|perty. |
|000017e0| 54 68 65 20 76 61 6c 75 | 65 20 6f 66 20 74 68 65 |The valu|e of the|
|000017f0| 20 70 72 6f 70 65 72 74 | 79 20 69 73 20 72 65 74 | propert|y is ret|
|00001800| 75 72 6e 65 64 20 69 6e | 20 74 68 65 20 ff 00 16 |urned in| the ...|
|00001810| 0a 00 f7 65 76 65 6e 74 | 52 65 73 75 6c 74 f9 00 |...event|Result..|
|00001820| f7 ff 00 10 0c 00 f7 20 | 66 69 65 6c 64 20 6f 66 |....... |field of|
|00001830| 20 74 68 65 20 65 76 65 | 6e 74 20 70 61 72 61 6d | the eve|nt param|
|00001840| 65 74 65 72 20 62 6c 6f | 63 6b 2e ff 00 10 0c 00 |eter blo|ck......|
|00001850| f7 0d 00 0c 24 00 02 fc | 00 21 24 00 0c 36 00 23 |....$...|.!$..6.#|
|00001860| 01 96 0d ff 00 10 0c 05 | f7 43 61 6c 6c 62 61 63 |........|.Callbac|
|00001870| 6b 73 ff 00 10 0c 00 f7 | f9 00 f7 0d 41 20 63 61 |ks......|....A ca|
|00001880| 6c 6c 62 61 63 6b 20 69 | 73 20 61 20 6d 65 63 68 |llback i|s a mech|
|00001890| 61 6e 69 73 6d 20 74 68 | 61 74 20 61 6c 6c 6f 77 |anism th|at allow|
|000018a0| 73 20 61 6e 20 58 43 4d | 44 20 74 6f 20 72 65 71 |s an XCM|D to req|
|000018b0| 75 65 73 74 20 73 65 72 | 76 69 63 65 73 20 66 72 |uest ser|vices fr|
|000018c0| 6f 6d 20 48 79 70 65 72 | 43 61 72 64 2e 20 20 53 |om Hyper|Card. S|
|000018d0| 6f 6d 65 20 6f 66 20 74 | 68 65 73 65 20 63 61 6c |ome of t|hese cal|
|000018e0| 6c 62 61 63 6b 73 20 64 | 6f 20 73 69 6d 70 6c 65 |lbacks d|o simple|
|000018f0| 20 74 68 69 6e 67 20 6c | 69 6b 65 20 63 6f 6e 76 | thing l|ike conv|
|00001900| 65 72 74 69 6e 67 20 73 | 74 72 69 6e 67 73 20 74 |erting s|trings t|
|00001910| 6f 20 6e 75 6d 62 65 72 | 73 20 61 6e 64 20 74 68 |o number|s and th|
|00001920| 65 20 6c 69 6b 65 2c 20 | 73 6f 6d 65 20 6c 65 74 |e like, |some let|
|00001930| 20 79 6f 75 20 65 78 65 | 63 75 74 65 20 48 79 70 | you exe|cute Hyp|
|00001940| 65 72 54 61 6c 6b 20 63 | 6f 64 65 20 61 6e 64 20 |erTalk c|ode and |
|00001950| 65 76 61 6c 75 61 74 65 | 20 65 78 70 72 65 73 73 |evaluate| express|
|00001960| 69 6f 6e 73 2e 20 20 45 | 78 74 65 72 6e 61 6c 20 |ions. E|xternal |
|00001970| 77 69 6e 64 6f 77 73 20 | 61 72 65 20 63 72 65 61 |windows |are crea|
|00001980| 74 65 64 20 62 79 20 63 | 61 6c 6c 62 61 63 6b 73 |ted by c|allbacks|
|00001990| 2e 20 20 45 78 74 65 72 | 6e 61 6c 20 77 69 6e 64 |. Exter|nal wind|
|000019a0| 6f 77 73 20 73 68 6f 75 | 6c 64 20 6e 6f 74 20 62 |ows shou|ld not b|
|000019b0| 65 20 63 72 65 61 74 65 | 64 20 61 6e 64 20 64 69 |e create|d and di|
|000019c0| 73 70 6f 73 65 64 20 6f | 66 20 20 64 69 72 65 63 |sposed o|f direc|
|000019d0| 74 6c 79 20 62 79 20 74 | 68 65 20 57 69 6e 64 6f |tly by t|he Windo|
|000019e0| 77 20 6f 72 20 44 69 61 | 6c 6f 67 20 4d 61 6e 61 |w or Dia|log Mana|
|000019f0| 67 65 72 73 2e 20 0d 0d | 02 7b ff 00 10 0c 00 f7 |gers. ..|.{......|
|00001a00| fc 00 5a 02 0a 00 5a 01 | 10 01 b0 06 30 f7 0d 4e |..Z...Z.|....0..N|
|00001a10| 6f 74 65 20 74 68 61 74 | 20 74 68 65 20 63 72 65 |ote that| the cre|
|00001a20| 61 74 69 6f 6e 20 61 6e | 64 20 64 69 73 70 6f 73 |ation an|d dispos|
|00001a30| 61 6c 20 6f 66 20 77 69 | 6e 64 6f 77 73 20 61 72 |al of wi|ndows ar|
|00001a40| 65 20 64 65 66 65 72 72 | 65 64 2e 20 20 41 20 63 |e deferr|ed. A c|
|00001a50| 61 6c 6c 20 74 6f 20 ff | 00 16 0a 00 f7 4e 65 77 |all to .|.....New|
|00001a60| 58 57 69 6e 64 6f 77 f9 | 00 f7 ff 00 10 0c 00 f7 |XWindow.|........|
|00001a70| 20 77 69 6c 6c 20 72 65 | 73 75 6c 74 20 69 6e 20 | will re|sult in |
|00001a80| 74 68 65 20 63 72 65 61 | 74 69 6f 6e 20 6f 66 20 |the crea|tion of |
|00001a90| 74 68 65 20 77 69 6e 64 | 6f 77 20 61 6e 64 20 61 |the wind|ow and a|
|00001aa0| 20 73 75 62 73 65 71 75 | 65 6e 74 20 63 61 6c 6c | subsequ|ent call|
|00001ab0| 20 74 6f 20 74 68 65 20 | 58 43 4d 44 20 77 69 74 | to the |XCMD wit|
|00001ac0| 68 20 61 6e 20 ff 00 16 | 0a 00 f7 78 4f 70 65 6e |h an ...|...xOpen|
|00001ad0| 45 76 74 f9 00 f7 ff 00 | 10 0c 00 f7 2e 20 20 54 |Evt.....|..... T|
|00001ae0| 68 65 20 73 61 6d 65 20 | 69 73 20 74 72 75 65 20 |he same |is true |
|00001af0| 77 68 65 6e 20 74 68 65 | 20 77 69 6e 64 6f 77 20 |when the| window |
|00001b00| 69 73 20 63 6c 6f 73 65 | 64 2e 20 20 57 68 65 6e |is close|d. When|
|00001b10| 20 79 6f 75 20 63 61 6c | 6c 20 ff 00 16 0a 00 f7 | you cal|l ......|
|00001b20| 43 6c 6f 73 65 58 57 69 | 6e 64 6f 77 f9 00 f7 ff |CloseXWi|ndow....|
|00001b30| 00 10 0c 00 f7 2c 20 79 | 6f 75 20 77 69 6c 6c 20 |....., y|ou will |
|00001b40| 6c 61 74 65 72 20 72 65 | 63 65 69 76 65 20 61 6e |later re|ceive an|
|00001b50| 20 ff 00 16 0a 00 f7 78 | 43 6c 6f 73 65 45 76 74 | ......x|CloseEvt|
|00001b60| f9 00 f7 ff 00 10 0c 00 | f7 20 75 70 6f 6e 20 77 |........|. upon w|
|00001b70| 68 69 63 68 20 79 6f 75 | 20 63 61 6e 20 64 69 73 |hich you| can dis|
|00001b80| 70 6f 73 65 20 6f 66 20 | 61 6e 79 20 62 6c 6f 63 |pose of |any bloc|
|00001b90| 6b 73 20 79 6f 75 20 68 | 61 76 65 20 72 65 66 65 |ks you h|ave refe|
|00001ba0| 72 65 6e 63 65 64 20 62 | 79 20 74 68 65 20 72 65 |renced b|y the re|
|00001bb0| 66 43 6f 6e 20 6f 66 20 | 74 68 65 20 77 69 6e 64 |fCon of |the wind|
|00001bc0| 6f 77 2e 20 20 54 68 69 | 73 20 61 6c 6c 6f 77 73 |ow. Thi|s allows|
|00001bd0| 20 48 79 70 65 72 43 61 | 72 64 20 74 6f 20 64 6f | HyperCa|rd to do|
|00001be0| 20 61 6e 79 20 62 6f 6f | 6b 65 65 70 69 6e 67 20 | any boo|keeping |
|00001bf0| 61 73 73 6f 63 69 61 74 | 65 64 20 77 69 74 68 20 |associat|ed with |
|00001c00| 79 6f 75 72 20 77 69 6e | 64 6f 77 73 2c 20 61 6e |your win|dows, an|
|00001c10| 64 20 70 72 65 76 65 6e | 74 73 20 61 20 72 65 65 |d preven|ts a ree|
|00001c20| 6e 74 72 61 6e 74 20 69 | 6e 76 6f 63 61 74 69 6f |ntrant i|nvocatio|
|00001c30| 6e 20 6f 66 20 74 68 65 | 20 58 43 4d 44 20 66 72 |n of the| XCMD fr|
|00001c40| 6f 6d 20 70 75 6c 6c 69 | 6e 67 20 74 68 65 20 72 |om pulli|ng the r|
|00001c50| 75 67 20 6f 75 74 20 66 | 72 6f 6d 20 75 6e 64 65 |ug out f|rom unde|
|00001c60| 72 20 6f 74 68 65 72 20 | 69 6e 76 6f 63 61 74 69 |r other |invocati|
|00001c70| 6f 6e 73 2e 0d 01 e3 0d | ff 00 10 0c 05 f7 41 20 |ons.....|......A |
|00001c80| 4e 65 61 74 20 48 61 63 | 6b 20 2d 20 48 79 70 65 |Neat Hac|k - Hype|
|00001c90| 72 43 61 72 64 20 43 61 | 6c 6c 62 61 63 6b 73 20 |rCard Ca|llbacks |
|00001ca0| 57 69 74 68 69 6e 20 61 | 20 54 6f 6f 6c 62 6f 78 |Within a| Toolbox|
|00001cb0| 20 63 61 6c 6c 62 61 63 | 6b ff 00 10 0c 00 f7 20 | callbac|k...... |
|00001cc0| 0d 4f 6e 65 20 6f 66 20 | 74 68 65 20 68 61 6e 64 |.One of |the hand|
|00001cd0| 69 65 73 74 20 74 72 61 | 70 73 20 69 6e 20 74 68 |iest tra|ps in th|
|00001ce0| 65 20 4d 61 63 20 54 6f | 6f 6c 62 6f 78 20 69 73 |e Mac To|olbox is|
|00001cf0| 20 74 68 65 20 ff 00 16 | 0a 00 f7 44 72 61 79 47 | the ...|...DrayG|
|00001d00| 72 61 79 52 67 6e f9 00 | f7 ff 00 10 0c 00 f7 20 |rayRgn..|....... |
|00001d10| 74 72 61 70 2e 20 20 49 | 74 27 73 20 75 73 65 64 |trap. I|t's used|
|00001d20| 20 62 79 20 74 68 65 20 | 73 79 73 74 65 6d 20 74 | by the |system t|
|00001d30| 6f 20 70 72 6f 76 69 64 | 65 20 66 65 65 64 62 61 |o provid|e feedba|
|00001d40| 63 6b 20 77 68 69 6c 65 | 20 64 72 61 67 67 69 6e |ck while| draggin|
|00001d50| 67 20 77 69 6e 64 6f 77 | 73 2c 20 69 63 6f 6e 73 |g window|s, icons|
|00001d60| 20 61 6e 64 20 63 6f 6e | 74 72 6f 6c 20 70 61 72 | and con|trol par|
|00001d70| 74 73 20 6f 6e 20 74 68 | 65 20 73 63 72 65 65 6e |ts on th|e screen|
|00001d80| 2e 20 20 49 20 63 72 65 | 61 74 65 64 20 61 6e 20 |. I cre|ated an |
|00001d90| 58 43 4d 44 20 77 69 74 | 68 20 74 68 65 20 73 61 |XCMD wit|h the sa|
|00001da0| 6d 65 20 73 65 74 20 6f | 66 20 70 61 72 61 6d 65 |me set o|f parame|
|00001db0| 74 65 72 73 20 61 6e 64 | 20 66 75 6e 63 74 69 6f |ters and| functio|
|00001dc0| 6e 61 6c 69 74 79 20 74 | 68 61 74 20 74 68 65 20 |nality t|hat the |
|00001dd0| 54 6f 6f 6c 62 6f 78 20 | 74 72 61 70 20 64 69 64 |Toolbox |trap did|
|00001de0| 2c 20 61 6e 64 20 74 68 | 61 74 20 69 6e 63 6c 75 |, and th|at inclu|
|00001df0| 64 65 73 20 61 20 64 72 | 61 67 20 68 6f 6f 6b 20 |des a dr|ag hook |
|00001e00| 70 72 6f 63 65 64 75 72 | 65 20 74 68 61 74 20 69 |procedur|e that i|
|00001e10| 73 20 63 61 6c 6c 65 64 | 20 63 6f 6e 74 69 6e 75 |s called| continu|
|00001e20| 6f 75 73 6c 79 20 77 68 | 69 6c 65 20 74 68 65 20 |ously wh|ile the |
|00001e30| 6d 6f 75 73 65 20 69 73 | 20 64 6f 77 6e 2e 20 20 |mouse is| down. |
|00001e40| 54 68 65 20 74 72 61 70 | 20 6c 6f 6f 6b 20 6c 69 |The trap| look li|
|00001e50| 6b 65 20 74 68 69 73 3a | 20 0d 04 14 fc 00 5a 02 |ke this:| .....Z.|
|00001e60| 0a 00 5a 00 10 01 b0 06 | 30 f7 09 ff 00 16 0a 00 |..Z.....|0.......|
|00001e70| f7 46 75 6e 63 74 69 6f | 6e 20 44 72 61 67 47 72 |.Functio|n DragGr|
|00001e80| 61 79 52 67 6e 20 28 74 | 68 65 52 67 6e 3a 20 52 |ayRgn (t|heRgn: R|
|00001e90| 67 6e 48 61 6e 64 6c 65 | 3b 20 73 74 61 72 74 50 |gnHandle|; startP|
|00001ea0| 74 3a 20 50 6f 69 6e 74 | 3b 20 6c 69 6d 69 74 52 |t: Point|; limitR|
|00001eb0| 65 63 74 2c 20 09 73 6c | 6f 70 52 65 63 74 3a 20 |ect, .sl|opRect: |
|00001ec0| 52 65 63 74 3b 20 61 78 | 69 73 3a 20 49 4e 54 45 |Rect; ax|is: INTE|
|00001ed0| 47 45 52 3b 20 61 63 74 | 69 6f 6e 50 72 6f 63 3a |GER; act|ionProc:|
|00001ee0| 20 50 72 6f 63 50 74 72 | 29 3a 20 4c 6f 6e 67 49 | ProcPtr|): LongI|
|00001ef0| 6e 74 3b 0d ff 00 10 0c | 00 f7 f9 00 f7 0d 54 68 |nt;.....|......Th|
|00001f00| 65 20 48 79 70 65 72 54 | 61 6c 6b 20 76 65 72 73 |e HyperT|alk vers|
|00001f10| 69 6f 6e 20 77 6f 75 6c | 64 20 6c 6f 6f 6b 20 6c |ion woul|d look l|
|00001f20| 69 6b 65 20 74 68 69 73 | 3a 0d 09 ff 00 04 09 00 |ike this|:.......|
|00001f30| f7 66 75 6e 63 74 69 6f | 6e 20 44 72 61 67 47 72 |.functio|n DragGr|
|00001f40| 61 79 20 74 68 65 52 67 | 6e 2c 20 73 74 61 72 74 |ay theRg|n, start|
|00001f50| 50 74 2c 20 6c 69 6d 69 | 74 2c 20 73 6c 6f 70 2c |Pt, limi|t, slop,|
|00001f60| 20 61 78 69 73 2c 20 61 | 63 74 69 6f 6e 4d 65 73 | axis, a|ctionMes|
|00001f70| 73 61 67 65 f9 00 f7 ff | 00 10 0c 00 f7 0d 0d fc |sage....|........|
|00001f80| 00 5a 02 0a 00 5a 01 10 | 01 b0 06 30 f7 54 68 69 |.Z...Z..|...0.Thi|
|00001f90| 73 20 70 72 65 73 65 6e | 74 65 64 20 61 20 6d 69 |s presen|ted a mi|
|00001fa0| 6e 6f 72 20 63 68 61 6c | 6c 65 6e 67 65 20 62 65 |nor chal|lenge be|
|00001fb0| 63 61 75 73 65 20 50 61 | 73 63 61 6c 20 63 6f 6d |cause Pa|scal com|
|00001fc0| 70 69 6c 65 72 73 20 72 | 65 71 75 69 72 65 20 74 |pilers r|equire t|
|00001fd0| 68 61 74 20 74 68 65 20 | 40 20 6f 70 65 72 61 74 |hat the |@ operat|
|00001fe0| 6f 72 20 6f 6e 6c 79 20 | 62 65 20 61 70 70 6c 69 |or only |be appli|
|00001ff0| 65 64 20 74 6f 20 70 72 | 6f 63 65 64 75 72 65 73 |ed to pr|ocedures|
|00002000| 20 64 65 63 6c 61 72 65 | 64 20 61 74 20 74 68 65 | declare|d at the|
|00002010| 20 6f 75 74 65 72 6d 6f | 73 74 20 6c 65 76 65 6c | outermo|st level|
|00002020| 2c 20 77 68 69 63 68 20 | 6c 65 61 76 65 73 20 74 |, which |leaves t|
|00002030| 68 65 6d 20 6f 75 74 20 | 6f 66 20 73 63 6f 70 65 |hem out |of scope|
|00002040| 20 6f 66 20 74 68 65 20 | 6d 61 69 6e 20 70 72 6f | of the |main pro|
|00002050| 63 65 64 75 72 65 20 61 | 6e 64 20 74 68 65 20 58 |cedure a|nd the X|
|00002060| 43 4d 44 20 70 61 72 61 | 6d 65 74 65 72 20 62 6c |CMD para|meter bl|
|00002070| 6f 63 6b 2e 20 20 4d 79 | 20 66 69 72 73 74 20 73 |ock. My| first s|
|00002080| 6f 6c 75 74 69 6f 6e 20 | 77 61 73 20 74 6f 20 74 |olution |was to t|
|00002090| 65 6d 70 6f 72 61 72 69 | 6c 79 20 75 73 65 20 74 |emporari|ly use t|
|000020a0| 68 65 20 72 65 66 43 6f | 6e 20 66 69 65 6c 64 20 |he refCo|n field |
|000020b0| 6f 66 20 74 68 65 20 46 | 72 6f 6e 74 57 69 6e 64 |of the F|rontWind|
|000020c0| 6f 77 20 74 6f 20 73 74 | 6f 72 65 20 61 20 70 6f |ow to st|ore a po|
|000020d0| 69 6e 74 65 72 20 74 6f | 20 74 68 65 20 64 61 74 |inter to| the dat|
|000020e0| 61 20 49 20 6e 65 65 64 | 65 64 20 74 6f 20 65 78 |a I need|ed to ex|
|000020f0| 65 63 75 74 65 20 74 68 | 65 20 63 61 6c 6c 62 61 |ecute th|e callba|
|00002100| 63 6b 2c 20 6e 61 6d 65 | 6c 79 20 74 68 65 20 58 |ck, name|ly the X|
|00002110| 63 6d 64 50 61 72 61 6d | 50 74 72 20 61 6e 64 20 |cmdParam|Ptr and |
|00002120| 74 68 65 20 6d 65 73 73 | 61 67 65 20 73 74 72 69 |the mess|age stri|
|00002130| 6e 67 20 74 6f 20 73 65 | 6e 64 20 62 61 63 6b 20 |ng to se|nd back |
|00002140| 74 6f 20 74 68 65 20 63 | 61 72 64 2e 20 20 54 68 |to the c|ard. Th|
|00002150| 69 73 20 77 6f 72 6b 65 | 64 20 77 69 74 68 20 76 |is worke|d with v|
|00002160| 65 72 73 69 6f 6e 20 31 | 2e 78 2c 20 62 75 74 20 |ersion 1|.x, but |
|00002170| 6e 6f 74 20 77 69 74 68 | 20 32 2e 30 2e 20 20 53 |not with| 2.0. S|
|00002180| 6f 20 6e 6f 77 20 49 20 | 73 74 75 66 66 20 69 74 |o now I |stuff it|
|00002190| 20 69 6e 20 74 68 65 20 | 6c 6f 77 20 6d 65 6d 6f | in the |low memo|
|000021a0| 72 79 20 67 6c 6f 62 61 | 6c ff 00 10 0a 00 f7 f9 |ry globa|l.......|
|000021b0| 05 f7 f4 f9 00 f7 ff 00 | 10 0c 00 f7 f9 00 f7 ff |........|........|
|000021c0| 00 10 0c 00 f7 20 ff 00 | 16 0a 00 f7 41 70 70 6c |..... ..|....Appl|
|000021d0| 53 63 72 61 74 63 68 f9 | 00 f7 ff 00 10 0c 00 f7 |Scratch.|........|
|000021e0| 2c 20 62 65 69 6e 67 20 | 63 61 72 65 66 75 6c 20 |, being |careful |
|000021f0| 74 6f 20 73 61 76 65 20 | 61 6e 64 20 72 65 73 74 |to save |and rest|
|00002200| 6f 72 65 20 69 74 20 69 | 6e 20 6f 72 64 65 72 20 |ore it i|n order |
|00002210| 74 6f 20 68 61 76 65 20 | 61 20 6d 69 6e 69 6d 61 |to have |a minima|
|00002220| 6c 20 69 6d 70 61 63 74 | 2e 20 20 49 20 68 61 76 |l impact|. I hav|
|00002230| 65 20 69 6e 63 6c 75 64 | 65 64 20 74 68 65 20 73 |e includ|ed the s|
|00002240| 6f 75 72 63 65 20 63 6f | 64 65 20 61 6e 64 20 61 |ource co|de and a|
|00002250| 20 64 65 6d 6f 20 73 74 | 61 63 6b 20 66 6f 72 20 | demo st|ack for |
|00002260| 79 6f 75 72 20 65 6e 6a | 6f 79 6d 65 6e 74 2e 0d |your enj|oyment..|
|00002270| 00 5a 64 00 10 f5 00 10 | a6 00 02 d7 00 10 a7 00 |.Zd.....|........|
|00002280| 02 0c 00 90 24 00 0c ff | 01 10 2c 00 07 b8 00 80 |....$...|..,.....|
|00002290| 24 00 18 60 00 90 25 00 | 09 cf 00 61 85 00 02 fc |$..`..%.|...a....|
|000022a0| 00 20 24 00 13 e1 01 10 | 64 00 03 a3 00 50 65 00 |. $.....|d....Pe.|
|000022b0| 04 9e 01 90 64 00 19 f8 | 00 90 24 00 1c 75 00 80 |....d...|..$..u..|
|000022c0| 64 00 1e 5a 00 e3 85 00 | 0c 36 00 20 01 e1 0d ff |d..Z....|.6. ....|
|000022d0| 00 10 0c 05 f7 41 20 4e | 65 61 74 20 48 61 63 6b |.....A N|eat Hack|
|000022e0| 20 2d 20 48 79 70 65 72 | 43 61 72 64 20 43 61 6c | - Hyper|Card Cal|
|000022f0| 6c 62 61 63 6b 73 20 57 | 69 74 68 69 6e 20 61 20 |lbacks W|ithin a |
|00002300| 54 6f 6f 6c 62 6f 78 20 | 63 61 6c 6c 62 61 63 6b |Toolbox |callback|
|00002310| ff 00 10 0c 00 f7 20 0d | 4f 6e 65 20 6f 66 20 74 |...... .|One of t|
|00002320| 68 65 20 68 61 6e 64 69 | 65 73 74 20 74 72 61 70 |he handi|est trap|
|00002330| 73 20 69 6e 20 74 68 65 | 20 4d 61 63 20 54 6f 6f |s in the| Mac Too|
|00002340| 6c 62 6f 78 20 69 73 20 | 74 68 65 20 ff 00 16 0a |lbox is |the ....|
|00002350| 00 f7 44 72 61 79 47 72 | 61 79 52 67 6e f9 00 f7 |..DrayGr|ayRgn...|
|00002360| ff 00 10 0c 00 f7 20 74 | 72 61 70 2e 20 20 49 74 |...... t|rap. It|
|00002370| 27 73 20 75 73 65 64 20 | 62 79 20 74 68 65 20 73 |'s used |by the s|
|00002380| 79 73 74 65 6d 20 74 6f | 20 70 72 6f 76 69 64 65 |ystem to| provide|
|00002390| 20 66 65 65 64 62 61 63 | 6b 20 77 68 69 6c 65 20 | feedbac|k while |
|000023a0| 64 72 61 67 67 69 6e 67 | 20 77 69 6e 64 6f 77 73 |dragging| windows|
|000023b0| 2c 20 69 63 6f 6e 73 20 | 61 6e 64 20 63 6f 6e 74 |, icons |and cont|
|000023c0| 72 6f 6c 20 70 61 72 74 | 73 20 6f 6e 20 74 68 65 |rol part|s on the|
|000023d0| 20 73 63 72 65 65 6e 2e | 20 20 49 20 63 72 65 61 | screen.| I crea|
|000023e0| 74 65 64 20 61 6e 20 58 | 43 4d 44 20 77 69 74 68 |ted an X|CMD with|
|000023f0| 20 74 68 65 20 73 61 6d | 65 20 73 65 74 20 6f 66 | the sam|e set of|
|00002400| 20 70 61 72 61 6d 65 74 | 65 72 73 20 61 6e 64 20 | paramet|ers and |
|00002410| 66 75 6e 63 74 69 6f 6e | 61 6c 69 74 79 20 74 68 |function|ality th|
|00002420| 61 74 20 74 68 65 20 54 | 6f 6f 6c 62 6f 78 20 74 |at the T|oolbox t|
|00002430| 72 61 70 20 64 69 64 2c | 20 61 6e 64 20 74 68 61 |rap did,| and tha|
|00002440| 74 20 69 6e 63 6c 75 64 | 65 73 20 61 6e 20 61 63 |t includ|es an ac|
|00002450| 74 69 6f 6e 20 70 72 6f | 63 65 64 75 72 65 20 74 |tion pro|cedure t|
|00002460| 68 61 74 20 69 73 20 63 | 61 6c 6c 65 64 20 63 6f |hat is c|alled co|
|00002470| 6e 74 69 6e 75 6f 75 73 | 6c 79 20 77 68 69 6c 65 |ntinuous|ly while|
|00002480| 20 74 68 65 20 6d 6f 75 | 73 65 20 69 73 20 64 6f | the mou|se is do|
|00002490| 77 6e 2e 20 20 54 68 65 | 20 74 72 61 70 20 6c 6f |wn. The| trap lo|
|000024a0| 6f 6b 20 6c 69 6b 65 20 | 74 68 69 73 3a 20 0d 04 |ok like |this: ..|
|000024b0| 55 fc 00 5a 02 0a 00 5a | 00 10 01 b0 06 30 f7 09 |U..Z...Z|.....0..|
|000024c0| ff 00 16 0a 00 f7 46 75 | 6e 63 74 69 6f 6e 20 44 |......Fu|nction D|
|000024d0| 72 61 67 47 72 61 79 52 | 67 6e 20 28 74 68 65 52 |ragGrayR|gn (theR|
|000024e0| 67 6e 3a 20 52 67 6e 48 | 61 6e 64 6c 65 3b 20 73 |gn: RgnH|andle; s|
|000024f0| 74 61 72 74 50 74 3a 20 | 50 6f 69 6e 74 3b 20 6c |tartPt: |Point; l|
|00002500| 69 6d 69 74 52 65 63 74 | 2c 20 09 73 6c 6f 70 52 |imitRect|, .slopR|
|00002510| 65 63 74 3a 20 52 65 63 | 74 3b 20 61 78 69 73 3a |ect: Rec|t; axis:|
|00002520| 20 49 4e 54 45 47 45 52 | 3b 20 61 63 74 69 6f 6e | INTEGER|; action|
|00002530| 50 72 6f 63 3a 20 50 72 | 6f 63 50 74 72 29 3a 20 |Proc: Pr|ocPtr): |
|00002540| 4c 6f 6e 67 49 6e 74 3b | 0d ff 00 10 0c 00 f7 f9 |LongInt;|........|
|00002550| 00 f7 0d 54 68 65 20 48 | 79 70 65 72 54 61 6c 6b |...The H|yperTalk|
|00002560| 20 76 65 72 73 69 6f 6e | 20 77 6f 75 6c 64 20 6c | version| would l|
|00002570| 6f 6f 6b 20 6c 69 6b 65 | 20 74 68 69 73 3a 0d 09 |ook like| this:..|
|00002580| ff 00 04 09 00 f7 66 75 | 6e 63 74 69 6f 6e 20 44 |......fu|nction D|
|00002590| 72 61 67 47 72 61 79 20 | 74 68 65 52 67 6e 2c 20 |ragGray |theRgn, |
|000025a0| 73 74 61 72 74 50 74 2c | 20 6c 69 6d 69 74 2c 20 |startPt,| limit, |
|000025b0| 73 6c 6f 70 2c 20 61 78 | 69 73 2c 20 61 63 74 69 |slop, ax|is, acti|
|000025c0| 6f 6e 4d 65 73 73 61 67 | 65 f9 00 f7 ff 00 10 0c |onMessag|e.......|
|000025d0| 00 f7 0d 0d fc 00 5a 02 | 0a 00 5a 01 10 01 b0 06 |......Z.|..Z.....|
|000025e0| 30 f7 54 68 69 73 20 70 | 72 65 73 65 6e 74 65 64 |0.This p|resented|
|000025f0| 20 61 20 6d 69 6e 6f 72 | 20 63 68 61 6c 6c 65 6e | a minor| challen|
|00002600| 67 65 20 62 65 63 61 75 | 73 65 20 50 61 73 63 61 |ge becau|se Pasca|
|00002610| 6c 20 63 6f 6d 70 69 6c | 65 72 73 20 72 65 71 75 |l compil|ers requ|
|00002620| 69 72 65 20 74 68 61 74 | 20 74 68 65 20 40 20 6f |ire that| the @ o|
|00002630| 70 65 72 61 74 6f 72 20 | 6f 6e 6c 79 20 62 65 20 |perator |only be |
|00002640| 61 70 70 6c 69 65 64 20 | 74 6f 20 70 72 6f 63 65 |applied |to proce|
|00002650| 64 75 72 65 73 20 64 65 | 63 6c 61 72 65 64 20 61 |dures de|clared a|
|00002660| 74 20 74 68 65 20 6f 75 | 74 65 72 6d 6f 73 74 20 |t the ou|termost |
|00002670| 6c 65 76 65 6c 2c 20 77 | 68 69 63 68 20 6c 65 61 |level, w|hich lea|
|00002680| 76 65 73 20 74 68 65 6d | 20 6f 75 74 20 6f 66 20 |ves them| out of |
|00002690| 73 63 6f 70 65 20 6f 66 | 20 74 68 65 20 6d 61 69 |scope of| the mai|
|000026a0| 6e 20 70 72 6f 63 65 64 | 75 72 65 20 61 6e 64 20 |n proced|ure and |
|000026b0| 74 68 65 20 58 43 4d 44 | 20 70 61 72 61 6d 65 74 |the XCMD| paramet|
|000026c0| 65 72 20 62 6c 6f 63 6b | 2e 20 20 49 20 6e 65 65 |er block|. I nee|
|000026d0| 64 65 64 20 74 6f 20 73 | 65 6e 64 20 61 20 48 79 |ded to s|end a Hy|
|000026e0| 70 65 72 54 61 6c 6b 20 | 6d 65 73 73 61 67 65 20 |perTalk |message |
|000026f0| 77 69 74 68 69 6e 20 74 | 68 65 20 64 72 61 67 20 |within t|he drag |
|00002700| 70 72 6f 63 65 64 75 72 | 65 2e 20 20 4d 79 20 66 |procedur|e. My f|
|00002710| 69 72 73 74 20 73 6f 6c | 75 74 69 6f 6e 20 77 61 |irst sol|ution wa|
|00002720| 73 20 74 6f 20 74 65 6d | 70 6f 72 61 72 69 6c 79 |s to tem|porarily|
|00002730| 20 75 73 65 20 74 68 65 | 20 72 65 66 43 6f 6e 20 | use the| refCon |
|00002740| 66 69 65 6c 64 20 6f 66 | 20 74 68 65 20 46 72 6f |field of| the Fro|
|00002750| 6e 74 57 69 6e 64 6f 77 | 20 74 6f 20 73 74 6f 72 |ntWindow| to stor|
|00002760| 65 20 61 20 70 6f 69 6e | 74 65 72 20 74 6f 20 74 |e a poin|ter to t|
|00002770| 68 65 20 64 61 74 61 20 | 49 20 6e 65 65 64 65 64 |he data |I needed|
|00002780| 20 74 6f 20 65 78 65 63 | 75 74 65 20 74 68 65 20 | to exec|ute the |
|00002790| 63 61 6c 6c 62 61 63 6b | 2c 20 6e 61 6d 65 6c 79 |callback|, namely|
|000027a0| 20 74 68 65 20 58 63 6d | 64 50 61 72 61 6d 50 74 | the Xcm|dParamPt|
|000027b0| 72 20 61 6e 64 20 74 68 | 65 20 6d 65 73 73 61 67 |r and th|e messag|
|000027c0| 65 20 73 74 72 69 6e 67 | 20 74 6f 20 73 65 6e 64 |e string| to send|
|000027d0| 20 62 61 63 6b 20 74 6f | 20 74 68 65 20 63 61 72 | back to| the car|
|000027e0| 64 2e 20 20 54 68 69 73 | 20 77 6f 72 6b 65 64 20 |d. This| worked |
|000027f0| 77 69 74 68 20 76 65 72 | 73 69 6f 6e 20 31 2e 78 |with ver|sion 1.x|
|00002800| 2c 20 62 75 74 20 6e 6f | 74 20 77 69 74 68 20 32 |, but no|t with 2|
|00002810| 2e 30 2e 20 20 53 6f 20 | 6e 6f 77 20 49 20 73 74 |.0. So |now I st|
|00002820| 75 66 66 20 69 74 20 69 | 6e 20 74 68 65 20 6c 6f |uff it i|n the lo|
|00002830| 77 20 6d 65 6d 6f 72 79 | 20 67 6c 6f 62 61 6c ff |w memory| global.|
|00002840| 00 10 0a 00 f7 f9 05 f7 | f4 f9 00 f7 ff 00 10 0c |........|........|
|00002850| 00 f7 f9 00 f7 ff 00 10 | 0c 00 f7 20 ff 00 16 0a |........|... ....|
|00002860| 00 f7 41 70 70 6c 53 63 | 72 61 74 63 68 f9 00 f7 |..ApplSc|ratch...|
|00002870| ff 00 10 0c 00 f7 2c 20 | 62 65 69 6e 67 20 63 61 |......, |being ca|
|00002880| 72 65 66 75 6c 20 74 6f | 20 73 61 76 65 20 61 6e |reful to| save an|
|00002890| 64 20 72 65 73 74 6f 72 | 65 20 69 74 20 69 6e 20 |d restor|e it in |
|000028a0| 6f 72 64 65 72 20 74 6f | 20 68 61 76 65 20 61 20 |order to| have a |
|000028b0| 6d 69 6e 69 6d 61 6c 20 | 69 6d 70 61 63 74 2e 20 |minimal |impact. |
|000028c0| 20 49 20 68 61 76 65 20 | 69 6e 63 6c 75 64 65 64 | I have |included|
|000028d0| 20 74 68 65 20 73 6f 75 | 72 63 65 20 63 6f 64 65 | the sou|rce code|
|000028e0| 20 61 6e 64 20 61 20 64 | 65 6d 6f 20 73 74 61 63 | and a d|emo stac|
|000028f0| 6b 20 66 6f 72 20 79 6f | 75 72 20 65 6e 6a 6f 79 |k for yo|ur enjoy|
|00002900| 6d 65 6e 74 2e 0d 00 5a | 64 00 10 f5 00 10 a6 00 |ment...Z|d.......|
|00002910| 02 d7 00 10 a7 00 02 0c | 00 90 24 00 0c ff 01 10 |........|..$.....|
|00002920| 2c 00 07 b8 00 80 24 00 | 18 60 00 90 25 00 09 cf |,.....$.|.`..%...|
|00002930| 00 61 85 00 02 fc 00 20 | 24 00 13 e1 01 10 64 00 |.a..... |$.....d.|
|00002940| 03 a3 00 50 65 00 04 9e | 01 90 64 00 19 f8 00 90 |...Pe...|..d.....|
|00002950| 24 00 22 cc 00 70 64 00 | 24 af 00 f3 85 00 0c 36 |$."..pd.|$......6|
|00002960| 00 20 04 9b 0d 49 66 20 | 79 6f 75 20 6e 65 65 64 |. ...If |you need|
|00002970| 20 74 6f 20 73 74 6f 72 | 65 20 64 61 74 61 20 62 | to stor|e data b|
|00002980| 65 74 77 65 65 6e 20 69 | 6e 76 6f 63 61 74 69 6f |etween i|nvocatio|
|00002990| 6e 73 20 6f 66 20 79 6f | 75 72 20 58 43 4d 44 2c |ns of yo|ur XCMD,|
|000029a0| 20 61 6e 64 20 79 6f 75 | 20 69 6e 76 61 72 69 61 | and you| invaria|
|000029b0| 62 6c 79 20 64 6f 2c 20 | 79 6f 75 20 73 68 6f 75 |bly do, |you shou|
|000029c0| 6c 64 20 64 65 63 6c 61 | 72 65 20 61 20 72 65 63 |ld decla|re a rec|
|000029d0| 6f 72 64 20 74 79 70 65 | 20 63 6f 6e 74 61 69 6e |ord type| contain|
|000029e0| 69 6e 67 20 61 6c 6c 20 | 6f 66 20 74 68 65 20 66 |ing all |of the f|
|000029f0| 69 65 6c 64 73 20 6e 65 | 65 64 65 64 20 62 65 74 |ields ne|eded bet|
|00002a00| 77 65 65 6e 20 69 6e 76 | 6f 63 61 74 69 6f 6e 73 |ween inv|ocations|
|00002a10| 2c 20 61 6e 64 20 73 74 | 6f 72 65 20 61 20 68 61 |, and st|ore a ha|
|00002a20| 6e 64 6c 65 20 74 6f 20 | 61 20 72 65 6c 6f 63 61 |ndle to |a reloca|
|00002a30| 74 61 62 6c 65 20 62 6c | 6f 63 6b 20 63 6f 6e 74 |table bl|ock cont|
|00002a40| 61 69 6e 69 6e 67 20 6f | 6e 65 20 6f 66 20 74 68 |aining o|ne of th|
|00002a50| 65 73 65 20 72 65 63 6f | 72 64 73 20 69 6e 20 74 |ese reco|rds in t|
|00002a60| 68 65 20 ff 00 16 0a 00 | f7 72 65 66 43 6f 6e ff |he .....|.refCon.|
|00002a70| 00 10 0c 00 f7 20 66 69 | 65 6c 64 20 6f 66 20 74 |..... fi|eld of t|
|00002a80| 68 65 20 77 69 6e 64 6f | 77 20 72 65 63 6f 72 64 |he windo|w record|
|00002a90| 20 75 73 69 6e 67 20 74 | 68 65 20 54 6f 6f 6c 62 | using t|he Toolb|
|00002aa0| 6f 78 20 54 72 61 70 20 | ff 00 16 0a 00 f7 53 65 |ox Trap |......Se|
|00002ab0| 74 57 52 65 66 43 6f 6e | f9 00 f7 ff 00 10 0c 00 |tWRefCon|........|
|00002ac0| f7 2e 20 20 59 6f 75 20 | 74 68 65 20 72 65 74 72 |.. You |the retr|
|00002ad0| 69 65 76 65 20 74 68 65 | 20 64 61 74 61 20 64 75 |ieve the| data du|
|00002ae0| 72 69 6e 67 20 6c 61 74 | 65 72 20 69 6e 76 6f 63 |ring lat|er invoc|
|00002af0| 61 74 69 6f 6e 73 20 77 | 69 74 68 20 ff 00 16 0a |ations w|ith ....|
|00002b00| 00 f7 47 ff 00 16 0a 00 | f7 65 74 57 52 65 66 43 |..G.....|.etWRefC|
|00002b10| 6f 6e f9 00 f7 ff 00 10 | 0c 00 f7 2e 0d 0d 42 65 |on......|......Be|
|00002b20| 6c 6f 77 20 49 20 68 61 | 76 65 20 69 6e 63 6c 75 |low I ha|ve inclu|
|00002b30| 64 65 64 20 74 68 65 20 | 63 6f 64 65 20 66 72 6f |ded the |code fro|
|00002b40| 6d 20 61 6e 20 65 76 65 | 6e 74 20 64 69 73 70 61 |m an eve|nt dispa|
|00002b50| 74 63 68 69 6e 67 20 70 | 72 6f 63 65 64 75 72 65 |tching p|rocedure|
|00002b60| 20 66 72 6f 6d 20 6d 79 | 20 48 65 6c 70 57 69 6e | from my| HelpWin|
|00002b70| 64 6f 77 20 58 43 4d 44 | 20 28 77 68 69 63 68 20 |dow XCMD| (which |
|00002b80| 49 20 63 6f 70 69 65 64 | 20 66 72 6f 6d 20 61 20 |I copied| from a |
|00002b90| 73 61 6d 70 6c 65 20 58 | 43 4d 44 20 64 69 73 74 |sample X|CMD dist|
|00002ba0| 72 69 62 75 74 65 64 20 | 77 69 74 68 20 62 65 74 |ributed |with bet|
|00002bb0| 61 20 76 65 72 73 69 6f | 6e 73 20 6f 66 20 48 79 |a versio|ns of Hy|
|00002bc0| 70 65 72 43 61 72 64 29 | 2e 20 20 54 68 65 20 65 |perCard)|. The e|
|00002bd0| 76 65 6e 74 20 6d 61 6e | 61 67 65 6d 65 6e 74 20 |vent man|agement |
|00002be0| 63 6f 64 65 20 74 68 61 | 74 20 69 73 20 73 69 6d |code tha|t is sim|
|00002bf0| 69 6c 61 72 20 74 6f 20 | 20 4d 61 63 20 61 70 70 |ilar to | Mac app|
|00002c00| 6c 69 63 61 74 69 6f 6e | 73 20 68 61 73 20 62 65 |lication|s has be|
|00002c10| 65 6e 20 72 65 6d 6f 76 | 65 64 2e 20 20 54 68 69 |en remov|ed. Thi|
|00002c20| 73 20 58 43 4d 44 20 61 | 6c 73 6f 20 69 6d 70 6c |s XCMD a|lso impl|
|00002c30| 65 6d 65 6e 74 73 20 61 | 20 ff 00 04 09 00 f7 74 |ements a| ......t|
|00002c40| 65 78 74 f9 00 f7 ff 00 | 10 0c 00 f7 20 70 72 6f |ext.....|.... pro|
|00002c50| 70 65 72 74 79 20 77 68 | 69 63 68 20 63 61 6e 20 |perty wh|ich can |
|00002c60| 62 65 20 73 65 74 2c 20 | 75 70 6f 6e 20 77 68 69 |be set, |upon whi|
|00002c70| 63 68 20 74 68 65 20 77 | 69 6e 64 6f 77 20 69 73 |ch the w|indow is|
|00002c80| 20 61 75 74 6f 6d 61 74 | 69 63 61 6c 6c 79 20 75 | automat|ically u|
|00002c90| 70 64 61 74 65 64 2e 20 | 20 57 68 65 6e 20 61 20 |pdated. | When a |
|00002ca0| ff 00 16 0a 00 f7 78 53 | 65 74 50 72 6f 70 45 76 |......xS|etPropEv|
|00002cb0| 74 f9 00 f7 ff 00 10 0c | 00 f7 20 65 76 65 6e 74 |t.......|.. event|
|00002cc0| 20 69 73 20 72 65 63 65 | 69 76 65 64 2c 20 74 68 | is rece|ived, th|
|00002cd0| 65 20 66 69 72 73 74 20 | 65 76 65 6e 74 20 70 61 |e first |event pa|
|00002ce0| 72 61 6d 65 74 65 72 20 | 69 73 20 74 68 65 20 6e |rameter |is the n|
|00002cf0| 61 6d 65 20 6f 66 20 74 | 68 65 20 70 72 6f 70 65 |ame of t|he prope|
|00002d00| 72 74 79 20 61 6e 64 20 | 74 68 65 20 73 65 63 6f |rty and |the seco|
|00002d10| 6e 64 20 69 73 20 74 68 | 65 20 6e 65 77 20 76 61 |nd is th|e new va|
|00002d20| 6c 75 65 2e 20 20 57 68 | 65 6e 20 61 20 ff 00 16 |lue. Wh|en a ...|
|00002d30| 0a 00 f7 78 47 65 74 50 | 72 6f 70 45 76 74 ff 00 |...xGetP|ropEvt..|
|00002d40| 10 0c 00 f7 f9 00 f7 20 | 69 73 20 72 65 63 65 69 |....... |is recei|
|00002d50| 76 65 64 2c 20 74 68 65 | 20 66 69 72 73 74 20 65 |ved, the| first e|
|00002d60| 76 65 6e 74 20 70 61 72 | 61 6d 65 74 65 72 20 69 |vent par|ameter i|
|00002d70| 73 20 74 68 65 20 6e 61 | 6d 65 20 6f 66 20 74 68 |s the na|me of th|
|00002d80| 65 20 70 72 6f 70 65 72 | 74 79 2e 20 20 54 68 65 |e proper|ty. The|
|00002d90| 20 76 61 6c 75 65 20 6f | 66 20 74 68 65 20 70 72 | value o|f the pr|
|00002da0| 6f 70 65 72 74 79 20 69 | 73 20 72 65 74 75 72 6e |operty i|s return|
|00002db0| 65 64 20 69 6e 20 74 68 | 65 20 ff 00 16 0a 00 f7 |ed in th|e ......|
|00002dc0| 65 76 65 6e 74 52 65 73 | 75 6c 74 f9 00 f7 ff 00 |eventRes|ult.....|
|00002dd0| 10 0c 00 f7 20 66 69 65 | 6c 64 20 6f 66 20 74 68 |.... fie|ld of th|
|00002de0| 65 20 65 76 65 6e 74 20 | 70 61 72 61 6d 65 74 65 |e event |paramete|
|00002df0| 72 20 62 6c 6f 63 6b 2e | ff 00 10 0c 00 f7 0d 03 |r block.|........|
|00002e00| 58 fc 00 5a 02 0a 00 5a | 01 10 01 b0 01 f0 08 02 |X..Z...Z|........|
|00002e10| 40 02 88 02 d0 06 30 f7 | ff 00 16 09 00 f7 20 20 |@.....0.|...... |
|00002e20| 50 52 4f 43 45 44 55 52 | 45 20 50 72 6f 63 65 73 |PROCEDUR|E Proces|
|00002e30| 73 45 76 65 6e 74 20 28 | 74 68 65 57 69 6e 64 6f |sEvent (|theWindo|
|00002e40| 77 3a 20 57 69 6e 64 6f | 77 50 74 72 3b 0d 09 09 |w: Windo|wPtr;...|
|00002e50| 74 68 65 45 76 65 6e 74 | 3a 20 45 76 65 6e 74 52 |theEvent|: EventR|
|00002e60| 65 63 6f 72 64 29 3b 0d | 09 42 45 47 49 4e 0d 09 |ecord);.|.BEGIN..|
|00002e70| 43 41 53 45 20 74 68 65 | 45 76 65 6e 74 2e 77 68 |CASE the|Event.wh|
|00002e80| 61 74 20 4f 46 0d 09 09 | 7b 20 74 68 65 20 75 73 |at OF...|{ the us|
|00002e90| 75 61 6c 20 61 63 74 69 | 76 61 74 65 2c 20 75 70 |ual acti|vate, up|
|00002ea0| 64 61 74 65 2c 20 6d 6f | 75 73 65 44 6f 77 6e 2c |date, mo|useDown,|
|00002eb0| 20 65 74 63 2e 20 77 6f | 75 6c 64 20 67 6f 20 68 | etc. wo|uld go h|
|00002ec0| 65 72 65 20 7d 0d 09 09 | 78 4f 70 65 6e 45 76 74 |ere }...|xOpenEvt|
|00002ed0| 3a 20 0d 20 20 20 20 20 | 20 09 09 44 6f 4f 70 65 |: . | ..DoOpe|
|00002ee0| 6e 53 74 75 66 66 28 74 | 68 65 57 69 6e 64 6f 77 |nStuff(t|heWindow|
|00002ef0| 29 3b 0d 20 20 20 20 20 | 09 78 43 75 72 73 6f 72 |);. |.xCursor|
|00002f00| 57 69 74 68 69 6e 3a 20 | 0d 20 20 20 20 20 20 09 |Within: |. .|
|00002f10| 09 70 61 72 61 6d 50 74 | 72 5e 2e 70 61 73 73 46 |.paramPt|r^.passF|
|00002f20| 6c 61 67 20 3a 3d 20 54 | 52 55 45 3b 0d 20 20 20 |lag := T|RUE;. |
|00002f30| 20 20 09 78 47 65 74 50 | 72 6f 70 45 76 74 3a 20 | .xGetP|ropEvt: |
|00002f40| 0d 20 20 20 20 20 20 09 | 09 57 49 54 48 20 58 57 |. .|.WITH XW|
|00002f50| 45 76 65 6e 74 49 6e 66 | 6f 50 74 72 28 70 61 72 |EventInf|oPtr(par|
|00002f60| 61 6d 50 74 72 5e 2e 70 | 61 72 61 6d 73 5b 31 5d |amPtr^.p|arams[1]|
|00002f70| 29 5e 20 44 4f 0d 20 20 | 20 20 20 20 20 09 09 09 |)^ DO. | ...|
|00002f80| 65 76 65 6e 74 52 65 73 | 75 6c 74 20 3a 3d 20 47 |eventRes|ult := G|
|00002f90| 65 74 50 72 6f 70 65 72 | 74 79 28 74 68 65 57 69 |etProper|ty(theWi|
|00002fa0| 6e 64 6f 77 2c 20 53 74 | 72 69 6e 67 50 74 72 28 |ndow, St|ringPtr(|
|00002fb0| 65 76 65 6e 74 50 61 72 | 61 6d 73 5b 31 5d 29 29 |eventPar|ams[1]))|
|00002fc0| 3b 0d 20 20 20 20 20 09 | 78 53 65 74 50 72 6f 70 |;. .|xSetProp|
|00002fd0| 45 76 74 3a 20 0d 20 20 | 20 20 20 20 09 09 57 49 |Evt: . | ..WI|
|00002fe0| 54 48 20 58 57 45 76 65 | 6e 74 49 6e 66 6f 50 74 |TH XWEve|ntInfoPt|
|00002ff0| 72 28 70 61 72 61 6d 50 | 74 72 5e 2e 70 61 72 61 |r(paramP|tr^.para|
|00003000| 6d 73 5b 31 5d 29 5e 20 | 44 4f 0d 20 20 20 20 20 |ms[1])^ |DO. |
|00003010| 20 20 09 09 09 53 65 74 | 50 72 6f 70 65 72 74 79 | ...Set|Property|
|00003020| 28 74 68 65 57 69 6e 64 | 6f 77 2c 53 74 72 69 6e |(theWind|ow,Strin|
|00003030| 67 50 74 72 28 65 76 65 | 6e 74 50 61 72 61 6d 73 |gPtr(eve|ntParams|
|00003040| 5b 31 5d 29 2c 48 61 6e | 64 6c 65 28 65 76 65 6e |[1]),Han|dle(even|
|00003050| 74 50 61 72 61 6d 73 5b | 32 5d 29 29 3b 0d 20 20 |tParams[|2]));. |
|00003060| 20 20 20 09 78 48 69 64 | 65 50 61 6c 65 74 74 65 | .xHid|ePalette|
|00003070| 73 45 76 74 3a 20 0d 20 | 20 20 20 20 20 09 09 48 |sEvt: . | ..H|
|00003080| 69 64 65 57 69 6e 64 6f | 77 28 74 68 65 57 69 6e |ideWindo|w(theWin|
|00003090| 64 6f 77 29 3b 0d 20 20 | 20 20 20 09 78 53 68 6f |dow);. | .xSho|
|000030a0| 77 50 61 6c 65 74 74 65 | 73 45 76 74 3a 20 0d 20 |wPalette|sEvt: . |
|000030b0| 20 20 20 20 20 09 09 53 | 68 6f 77 57 69 6e 64 6f | ..S|howWindo|
|000030c0| 77 28 74 68 65 57 69 6e | 64 6f 77 29 3b 0d 20 20 |w(theWin|dow);. |
|000030d0| 20 20 20 09 78 43 6c 6f | 73 65 45 76 74 3a 20 0d | .xClo|seEvt: .|
|000030e0| 20 20 20 20 20 20 09 09 | 42 45 47 49 4e 0d 20 20 | ..|BEGIN. |
|000030f0| 20 20 20 20 20 09 09 4b | 69 6c 6c 58 50 61 6c 65 | ..K|illXPale|
|00003100| 74 74 65 28 74 68 65 57 | 69 6e 64 6f 77 29 3b 0d |tte(theW|indow);.|
|00003110| 20 20 20 20 20 20 20 09 | 09 70 61 72 61 6d 50 74 | .|.paramPt|
|00003120| 72 5e 2e 70 61 73 73 46 | 6c 61 67 20 3a 3d 20 54 |r^.passF|lag := T|
|00003130| 52 55 45 3b 0d 20 20 20 | 20 20 20 09 09 45 4e 44 |RUE;. | ..END|
|00003140| 3b 0d 20 20 20 20 09 45 | 4e 44 3b 20 7b 63 61 73 |;. .E|ND; {cas|
|00003150| 65 7d 0d 09 45 4e 44 3b | 0d 00 5a 64 00 10 f5 00 |e}..END;|..Zd....|
|00003160| 10 a6 00 02 d7 00 10 a7 | 00 02 0c 00 90 24 00 0c |........|.....$..|
|00003170| ff 01 10 2c 00 07 b8 00 | 80 24 00 18 60 00 90 25 |...,....|.$..`..%|
|00003180| 00 09 cf 00 61 85 00 02 | fc 00 20 24 00 29 62 01 |....a...|.. $.)b.|
|00003190| 20 64 00 03 a3 00 50 65 | 00 2d ff 01 a0 64 00 19 | d....Pe|.-...d..|
|000031a0| f8 00 90 24 00 22 cc 00 | 70 64 00 24 af 00 f3 85 |...$."..|pd.$....|
|000031b0| 00 0c 36 00 20 04 96 0d | 49 66 20 79 6f 75 20 6e |..6. ...|If you n|
|000031c0| 65 65 64 20 74 6f 20 73 | 74 6f 72 65 20 64 61 74 |eed to s|tore dat|
|000031d0| 61 20 62 65 74 77 65 65 | 6e 20 69 6e 76 6f 63 61 |a betwee|n invoca|
|000031e0| 74 69 6f 6e 73 20 6f 66 | 20 79 6f 75 72 20 58 43 |tions of| your XC|
|000031f0| 4d 44 2c 20 61 6e 64 20 | 79 6f 75 20 69 6e 76 61 |MD, and |you inva|
|00003200| 72 69 61 62 6c 79 20 64 | 6f 2c 20 79 6f 75 20 73 |riably d|o, you s|
|00003210| 68 6f 75 6c 64 20 64 65 | 63 6c 61 72 65 20 61 20 |hould de|clare a |
|00003220| 72 65 63 6f 72 64 20 74 | 79 70 65 20 63 6f 6e 74 |record t|ype cont|
|00003230| 61 69 6e 69 6e 67 20 61 | 6c 6c 20 6f 66 20 74 68 |aining a|ll of th|
|00003240| 65 20 66 69 65 6c 64 73 | 20 6e 65 65 64 65 64 20 |e fields| needed |
|00003250| 62 65 74 77 65 65 6e 20 | 69 6e 76 6f 63 61 74 69 |between |invocati|
|00003260| 6f 6e 73 2c 20 61 6e 64 | 20 73 74 6f 72 65 20 61 |ons, and| store a|
|00003270| 20 68 61 6e 64 6c 65 20 | 74 6f 20 61 20 72 65 6c | handle |to a rel|
|00003280| 6f 63 61 74 61 62 6c 65 | 20 62 6c 6f 63 6b 20 63 |ocatable| block c|
|00003290| 6f 6e 74 61 69 6e 69 6e | 67 20 6f 6e 65 20 6f 66 |ontainin|g one of|
|000032a0| 20 74 68 65 73 65 20 72 | 65 63 6f 72 64 73 20 69 | these r|ecords i|
|000032b0| 6e 20 74 68 65 20 ff 00 | 16 0a 00 f7 72 65 66 43 |n the ..|....refC|
|000032c0| 6f 6e ff 00 10 0c 00 f7 | 20 66 69 65 6c 64 20 6f |on......| field o|
|000032d0| 66 20 74 68 65 20 77 69 | 6e 64 6f 77 20 72 65 63 |f the wi|ndow rec|
|000032e0| 6f 72 64 20 75 73 69 6e | 67 20 74 68 65 20 54 6f |ord usin|g the To|
|000032f0| 6f 6c 62 6f 78 20 54 72 | 61 70 20 ff 00 16 0a 00 |olbox Tr|ap .....|
|00003300| f7 53 65 74 57 52 65 66 | 43 6f 6e f9 00 f7 ff 00 |.SetWRef|Con.....|
|00003310| 10 0c 00 f7 2e 20 20 59 | 6f 75 20 74 68 65 20 72 |..... Y|ou the r|
|00003320| 65 74 72 69 65 76 65 20 | 74 68 65 20 64 61 74 61 |etrieve |the data|
|00003330| 20 64 75 72 69 6e 67 20 | 6c 61 74 65 72 20 69 6e | during |later in|
|00003340| 76 6f 63 61 74 69 6f 6e | 73 20 77 69 74 68 20 ff |vocation|s with .|
|00003350| 00 16 0a 00 f7 47 ff 00 | 16 0a 00 f7 65 74 57 52 |.....G..|....etWR|
|00003360| 65 66 43 6f 6e f9 00 f7 | ff 00 10 0c 00 f7 2e 0d |efCon...|........|
|00003370| 0d 42 65 6c 6f 77 20 49 | 20 68 61 76 65 20 69 6e |.Below I| have in|
|00003380| 63 6c 75 64 65 64 20 74 | 68 65 20 63 6f 64 65 20 |cluded t|he code |
|00003390| 66 72 6f 6d 20 61 6e 20 | 65 76 65 6e 74 20 64 69 |from an |event di|
|000033a0| 73 70 61 74 63 68 69 6e | 67 20 70 72 6f 63 65 64 |spatchin|g proced|
|000033b0| 75 72 65 20 66 72 6f 6d | 20 6d 79 20 48 65 6c 70 |ure from| my Help|
|000033c0| 57 69 6e 64 6f 77 20 58 | 43 4d 44 20 28 77 68 69 |Window X|CMD (whi|
|000033d0| 63 68 20 49 20 63 6f 70 | 69 65 64 20 66 72 6f 6d |ch I cop|ied from|
|000033e0| 20 61 20 73 61 6d 70 6c | 65 20 58 43 4d 44 20 64 | a sampl|e XCMD d|
|000033f0| 69 73 74 72 69 62 75 74 | 65 64 20 77 69 74 68 20 |istribut|ed with |
|00003400| 62 65 74 61 20 76 65 72 | 73 69 6f 6e 73 20 6f 66 |beta ver|sions of|
|00003410| 20 48 79 70 65 72 43 61 | 72 64 29 2e 20 20 54 68 | HyperCa|rd). Th|
|00003420| 65 20 65 76 65 6e 74 20 | 6d 61 6e 61 67 65 6d 65 |e event |manageme|
|00003430| 6e 74 20 63 6f 64 65 20 | 74 68 61 74 20 69 73 20 |nt code |that is |
|00003440| 73 69 6d 69 6c 61 72 20 | 74 6f 20 20 4d 61 63 20 |similar |to Mac |
|00003450| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 20 68 61 73 |applicat|ions has|
|00003460| 20 62 65 65 6e 20 72 65 | 6d 6f 76 65 64 2e 20 20 | been re|moved. |
|00003470| 54 68 69 73 20 58 43 4d | 44 20 69 6d 70 6c 65 6d |This XCM|D implem|
|00003480| 65 6e 74 73 20 61 20 ff | 00 04 09 00 f7 74 65 78 |ents a .|.....tex|
|00003490| 74 f9 00 f7 ff 00 10 0c | 00 f7 20 70 72 6f 70 65 |t.......|.. prope|
|000034a0| 72 74 79 20 77 68 69 63 | 68 20 63 61 6e 20 62 65 |rty whic|h can be|
|000034b0| 20 73 65 74 2c 20 75 70 | 6f 6e 20 77 68 69 63 68 | set, up|on which|
|000034c0| 20 74 68 65 20 77 69 6e | 64 6f 77 20 69 73 20 61 | the win|dow is a|
|000034d0| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 20 75 70 64 |utomatic|ally upd|
|000034e0| 61 74 65 64 2e 20 20 57 | 68 65 6e 20 61 20 ff 00 |ated. W|hen a ..|
|000034f0| 16 0a 00 f7 78 53 65 74 | 50 72 6f 70 45 76 74 f9 |....xSet|PropEvt.|
|00003500| 00 f7 ff 00 10 0c 00 f7 | 20 65 76 65 6e 74 20 69 |........| event i|
|00003510| 73 20 72 65 63 65 69 76 | 65 64 2c 20 74 68 65 20 |s receiv|ed, the |
|00003520| 66 69 72 73 74 20 65 76 | 65 6e 74 20 70 61 72 61 |first ev|ent para|
|00003530| 6d 65 74 65 72 20 69 73 | 20 74 68 65 20 6e 61 6d |meter is| the nam|
|00003540| 65 20 6f 66 20 74 68 65 | 20 70 72 6f 70 65 72 74 |e of the| propert|
|00003550| 79 20 61 6e 64 20 74 68 | 65 20 73 65 63 6f 6e 64 |y and th|e second|
|00003560| 20 69 73 20 74 68 65 20 | 6e 65 77 20 76 61 6c 75 | is the |new valu|
|00003570| 65 2e 20 20 57 68 65 6e | 20 61 20 ff 00 16 0a 00 |e. When| a .....|
|00003580| f7 78 47 65 74 50 72 6f | 70 45 76 74 ff 00 10 0c |.xGetPro|pEvt....|
|00003590| 00 f7 f9 00 f7 20 69 73 | 20 72 65 63 65 69 76 65 |..... is| receive|
|000035a0| 64 2c 20 74 68 65 20 66 | 69 72 73 74 20 65 76 65 |d, the f|irst eve|
|000035b0| 6e 74 20 70 61 72 61 6d | 65 74 65 72 20 69 73 20 |nt param|eter is |
|000035c0| 74 68 65 20 6e 61 6d 65 | 20 6f 66 20 74 68 65 20 |the name| of the |
|000035d0| 70 72 6f 70 65 72 74 79 | 2e 20 20 54 68 65 20 76 |property|. The v|
|000035e0| 61 6c 75 65 20 6f 66 20 | 74 68 65 20 70 72 6f 70 |alue of |the prop|
|000035f0| 65 72 74 79 20 69 73 20 | 72 65 74 75 72 6e 65 64 |erty is |returned|
|00003600| 20 69 6e 20 74 68 65 20 | ff 00 16 0a 00 f7 65 76 | in the |......ev|
|00003610| 65 6e 74 52 65 73 75 6c | 74 f9 00 f7 ff 00 10 0c |entResul|t.......|
|00003620| 00 f7 20 66 69 65 6c 64 | 20 6f 66 20 74 68 65 20 |.. field| of the |
|00003630| 65 76 65 6e 74 20 70 61 | 72 61 6d 65 74 65 72 20 |event pa|rameter |
|00003640| 62 6c 6f 63 6b 2e ff 00 | 10 0c 00 f7 0d 00 5a 64 |block...|......Zd|
|00003650| 00 10 f5 00 10 a6 00 02 | d7 00 10 a7 00 02 0c 00 |........|........|
|00003660| 90 24 00 0c ff 01 10 2c | 00 07 b8 00 80 24 00 18 |.$.....,|.....$..|
|00003670| 60 00 90 25 00 09 cf 00 | 61 85 00 02 fc 00 20 24 |`..%....|a..... $|
|00003680| 00 31 b5 01 20 64 00 03 | a3 00 50 65 00 2d ff 01 |.1.. d..|..Pe.-..|
|00003690| a0 64 00 19 f8 00 90 24 | 00 22 cc 00 70 64 00 24 |.d.....$|."..pd.$|
|000036a0| af 00 f3 85 00 0c 36 00 | 20 |......6.| |
+--------+-------------------------+-------------------------+--------+--------+